git commands

NOTE: if the folder is a git-repo, there should be a .git folder present.

Git Commands

# preset config
git config --global user.email "kashz@kashz.com"
git config --global user.name "kashz"

# check history of commit
git log

# # diff commit check
git diff COMMIT^!
git diff COMMIT1 COMMIT2
git diff-tree -p COMMIT

# adding file to repo
git add FILE

# add new commit
git commit -m MESSAGE

# push update to repo
git push -u origin

git commands using SSH

git-shell info

Last updated

Was this helpful?