Here we will be going to share the Top Git commands cheat sheet with you, which will help you while working on GIT or managing your project on GIT.
git init: This git command is used to create a new local GIT repository
git clone: This command is used to copy a repository from an existing URL
git add: This command is used to adds a file to the staging area.
git commit: This command is used to create a spanpshot of the changes and save it to the git directory
git push: Push locall change to the original
git status: List of new and modified files which are not yet committed
git diff: This command is used to shows the file differences and conflicts which are not yet staged.
git add[file]: Stage the file, ready for commit
git reset[file]: Unstage file, keeping the file changes
git commit -m 'Write you message here': Commit all stage files to versioned history
git branch: Will list your branches
git checkout: This command is used to switch from one branch to another branch and check it out into your working directory
git merge: Will merge the specified branch's history into the current branch
git log: This git command is used to show list the version history for the current branch.
git remote add: This command is used to create a new connection to a remote server
git fetch: get all the changes from the origen (no merge)
git pull: This command is used to fetch and merges all the changes on the remote server into your working directory.
git push: is used to upload your local repository changes to the origin remote repo

© SoundWebTech. All Rights Reserved.