Skip to content

Instantly share code, notes, and snippets.

@skwid138
Last active November 11, 2022 19:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?

Git Tips

Moved files or directories and git thinks they're deleted and new vs renamed.
The following will resolve most of this assuming the file contents themselves have not changed too much.
git add . -A

Add only previsouly staged or deleted files andd exclude unstaged (new) files
git add -u

Add only a portion of the changes in a file git add <file/path> -p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment