Git cheat sheet

Some of the stuff that i use more frequently and i still haven’t learned by heart yet, I will be putting them here, in this beautiful cheat sheet.

List all tracked files:

git ls-tree --full-tree -r --name-only HEAD

Untrack file in git:

echo "FILE_NAME" >> .gitignore
git rm --cached FILE_NAME
git add -u
git commit -m "removing file from source control"
git pull origin master
git push origin master

(replace master with the branch you're on)

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge