Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 26, 2020 11:26 am GMT

Git cheat sheet

I made this cheat sheet for git terminologies and most common commands when I was going through a Udacity course about version control. It helped me a lot and though it will be great to share it with others.

Repository this is a directory where your project/files are stored which are used to interact with Git.

commit this is when you make one or more changes to a file in git.

branch this is creating a new line of development. This is mainly used to continue working without messing with the main line of development.

git commit this is the command used to commit changes to your git repo. Commit contains a message which is used to describe what changes you've made.

staging area this is where git will put/store files while waiting for you to commit the file containing the changes.

SHA this is a unique ID number that is given to each of your commits.

git init this command is used to initialize your project into a repository.

git clone this command is used to copy an existing repository to your computer.

git checkout this command takes you to a different branch in your repo.

git checkout -b this command is used to create a new branch.

git status this command shows you the current status of your repo like files which are yet to be committed or the branch you are currently in.

git push this command sends all your commits to the Github/Gitlab/Bitbucket repo you have created.

git pull this command fetch all your files from your repo and integrate them with your local repo. I mostly use it to make sure everything is up to date and working correctly


Original Link: https://dev.to/chrissiemhrk/git-cheat-sheet-26ak

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To