Skip to content

Instantly share code, notes, and snippets.

@ArcRanges
Last active April 25, 2022 16:22
Show Gist options
  • Save ArcRanges/43f6d8a018344299da10ca9f18566f69 to your computer and use it in GitHub Desktop.
Save ArcRanges/43f6d8a018344299da10ca9f18566f69 to your computer and use it in GitHub Desktop.
Here's a list of git commands that might be useful in your programming journey

My compilation of helpful git commands

Problem: tracked files not being ignored by an updated .gitignore
Solution: untrack the files first then .gitignore will ignore them after

git rm -r --cached .        # untrack files, replace "." for any other directory
git add .                   # re-adding the files
git commit -m "issue fixed" # commiting changes
git push                    # pushing changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment