Git Commands Cheatsheet!
Getting Set Up!
-
git init [project name]. This command is one way to set up your project with git! This command creates a new local repository with a specified name. -
git clone [url]. This command is another way of setting up your project with git. In this way your project will be downloaded with its entire verion history.
Making changes...
-
git status, this command will list all new or modified files to commit. -
git add [file]orgit add ., this adds a file or in the case of the dot it adds all changed or new files in their present state to be committed. -
git commit -m "[descriptive message"], this is how to commit the changes you have added since the last commit.
Review history and synchronize changes.
-
git log, this command lists the version history on your current branch. -
git push, this command uploads all the local branch commits to a site, i.e. GitHub -
git pull, this command downloads bookmark history and incorporates changes.