Debug School

Narla Pavan Prateek
Narla Pavan Prateek

Posted on

Git Commands

git init: To init or create a local repository
git clone: to clone the remote repository to local
git pull: to pull the changes remote repository to local(working dir)
git add: to move the file to the staging area.
git commit: to commit the code to the local repository
git push: to push the code to the remote repository
git rm: remove the change or unstage it from local repo
git tag : to tag the latest commit in a local branch
git tag -d : delete the tag
git mv : to move the file or changes between two folders in local repo
git diff : to check the difference between two commits, two commit id need to be passed as arguments
git log: to check the history of commit for a specific branch
git stash: to stash the local changes in a temporary folder
git merge: to merge the changes between two local repos
git fetch: to merge the change between two remote branches
git cherrypick: to merge the particular change from feature to master branch or any branch
git revert: to revert the latest changes or commits from local branch
git status: to check the status of the particular change or file

Top comments (0)