Skip to content

Instantly share code, notes, and snippets.

@skwid138
Last active November 11, 2022 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skwid138/3beec8f35306acefa67b8d3043964bc0 to your computer and use it in GitHub Desktop.
Save skwid138/3beec8f35306acefa67b8d3043964bc0 to your computer and use it in GitHub Desktop.

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