Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HINT: Index: Adding changes step by step #207

Open
CodeAsm opened this issue Apr 16, 2024 · 0 comments
Open

HINT: Index: Adding changes step by step #207

CodeAsm opened this issue Apr 16, 2024 · 0 comments

Comments

@CodeAsm
Copy link

CodeAsm commented Apr 16, 2024

DO NOT use git mv [original] [target name]
as this will add the rename to the cached files to be commited.

Us mv instead. or manually change the file name.

I learned to use git mv to rename or move files and this tripped me up in this level so much. i was looking into the sourcecode for any errors.
https://github.com/git-learning-game/oh-my-git/blob/main/levels/index/steps#L20
is the exact spot that confused me, what where they checking? well, changes, that are NOT yet been cached or commited:
$ git diff --name-only
returns 0, nada, if you add them, and git mv emediatly adds them to the cach and commits the changes when you do a single commit (like git add broken_bottle, it ALSO adds the other renamed files if u use git mv)

TLDR:
use MV, not GIT MV like i did

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant