Useful git commands


Some useful git commands which I  learned.

If you want to delete everything (.git folder, files and folders), just delete the whole directory:

rm -rf directoryname

Add all file:

git add .


git commit -m "Your commit"

Change last commit:

git commit --amend

Whenever you are doing a git pull, always use the rebasing option:

git pull --rebase

Changing multiple commit message (interactive rebase):

 git rebase -i HEAD~number


You Might Also Like

No Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.