Open bguiz opened 1 year ago
I just switched from a previous branch to master and did a git pull and it said there was an abort due to existing files and I can't get rid of them. I've tried a git restore, git reset --hard, git checkout, git clean .
~/p/hedera-docs (patch-6|✚3)
git ch master
M .gitbook/assets/Smart Contracts (1).png
M .gitbook/assets/Smart Contracts.png
M .gitbook/assets/Token Service.png
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
~/p/hedera-docs (master|✚3)
git pull
remote: Enumerating objects: 540, done.
remote: Counting objects: 100% (537/537), done.
remote: Compressing objects: 100% (300/300), done.
remote: Total 540 (delta 275), reused 487 (delta 237), pack-reused 3
Receiving objects: 100% (540/540), 13.24 MiB | 2.71 MiB/s, done.
Resolving deltas: 100% (275/275), completed with 4 local objects.
From https://github.com/hashgraph/hedera-docs
5ff89a0..76d85d8 master -> origin/master
* [new branch] staging -> origin/staging
Updating 5ff89a0..76d85d8
error: Your local changes to the following files would be overwritten by merge:
.gitbook/assets/Smart Contracts (1).png
.gitbook/assets/Smart Contracts.png
Please commit your changes or stash them before you merge.
Aborting
~/p/hedera-docs (master↓66|✚3)
git status
On branch master
Your branch is behind 'origin/master' by 66 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .gitbook/assets/Smart Contracts (1).png
modified: .gitbook/assets/Smart Contracts.png
modified: .gitbook/assets/Token Service.png
no changes added to commit (use "git add" and/or "git commit -a")
@ElijahLynn I have a mac and MacOs is a case-insensitive file system. I was trying to do the DCO rebase sign-off command and was blocked saying there were changes (with those images you pointed out above) and I couldn't get passed it at all. Therefore, I ended up having to create a case-sensitive file system following https://docs.spryker.com/docs/scos/dev/tutorials-and-howtos/howtos/howto-handle-case-sensitive-file-system-on-mac-os.html#create-the-disk-image. It was not a smooth process but it unblocked me.
I've just done a fresh git clone
, and the following warnings are output:
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:
'.gitbook/assets/Network-topology.jpg'
'.gitbook/assets/network-topology.jpg'
'.gitbook/assets/Smart Contracts.png'
'.gitbook/assets/smart contracts.png'
And immediately after the git clone
:
user@admins-MBP hedera-docs % git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .gitbook/assets/Smart Contracts.png
no changes added to commit (use "git add" and/or "git commit -a")
user@admins-MBP hedera-docs % git restore .gitbook/assets/Smart\ Contracts.png
user@admins-MBP hedera-docs % git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .gitbook/assets/smart contracts.png
no changes added to commit (use "git add" and/or "git commit -a")
user@admins-MBP hedera-docs % git restore .gitbook/assets/smart\ contracts.png
user@admins-MBP hedera-docs % git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .gitbook/assets/Smart Contracts.png
no changes added to commit (use "git add" and/or "git commit -a")
(cycles indefinitely)
I'm not sure what you're getting at here. This issue/ticket is not complete/has not been resolved 100% yet
git checkout
, and was forced to do a fresh git clone
I'm not sure what you're getting at here. This issue/ticket is not complete/has not been resolved 100% yet
I'm not sure what is going on here just yet, but for me, 4 files keep showing up, so I made a PR to get them to not show anymore.
git pull
Updating 7be3b3e..0de25bd
error: Your local changes to the following files would be overwritten by merge:
.gitbook/assets/Consensus Service.png
.gitbook/assets/Smart Contracts (1).png
.gitbook/assets/Token Service.png
Please commit your changes or stash them before you merge.
Aborting
git stash
Saved working directory and index state WIP on master: 7be3b3e GITBOOK-2483: No subject
git status
On branch master
Your branch is behind 'origin/master' by 42 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .gitbook/assets/consensus service.png
modified: .gitbook/assets/smart contracts (1).png
modified: .gitbook/assets/smart contracts.png
modified: .gitbook/assets/token service.png
https://github.com/hashgraph/hedera-docs/pull/597
I feel like we need to do a working session to resolve this.
@ElijahLynn I agree, this has been a big friction point in contributing to docs for me and I feel this task should be prioritized.
We need to remove any duplicate file names where the difference is only the casing.
For example, token service.png and Token Service.png one of these should be deleted and the remaining file will need to be renamed to adhere to the standard naming convention token-service.png.
This task will be easier to complete on a windows machine as macOS is case-insensitive.
I've also requested the addition of a pre-commit hook to prevent further challenges in the future.
@ElijahLynn those files are not in the assets directory, so I am not sure why they are showing up.
@a-ridley I understand it's a friction point but this is a larger job than just deleting duplicate file names. We have to go page by page on docs.hedera.com to ensure we are deleting a file that is LIVE on the site. I learned this the hard way when I did attempt your suggested solution, which left some of the docs pages without images.
Unfortunately, this is not something I can prioritize over other issues at the moment but if you'd like to help by contributing, that'd be great.
@theekrystallee Here is a PR to address the issue of removing the duplicated files. https://github.com/hashgraph/hedera-docs/pull/598
Updated: The rest of the task to rename all files to meet naming conventions can wait as that is not impacting development :)
cc @ElijahLynn Two of those files you mentioned are not present (the others are present) and it may be due to your fork of the repository. The PR I've created should address you issue once it's merged in. If it doesn't, you may have to delete and fork again
@a-ridley thank you!! I initially thought you submitted a fix for all files and couldn't believe how quickly you turned that around 😅
Description
Problem
.gitbook/assets
which are probably unused (duplicates, earlier versions)Solution
-
, remove all(1)
and equivalents, all lowercase.Steps to reproduce
(1) On Mac or Linux, clone this repo
(2) Observe the warnings in the output
(3) List the files within that directory
(4) Observe the list of files output.
Additional context
NIL
Hedera network
other
Version
commit 494681a8981f83fe75e87f5040299362c2d66ed3 of this repo
Operating system
macOS