Git Functions - ScrantonHacks/ScrantonHacks_TRPG GitHub Wiki
Git is a distributed version control system in which all revisions made to the code are contained in a hashed working tree. The basic functions of Git are outlined below:
git status
Prints out the current condition of the staging area.
git add [files]
Stages changes made in the repository. Staged changes are modifications that have been approved to be added to the next commit.
git log
Lists the commits made to the current branch.
git pull
Retrieves all commits made to the remote repository and brings your local repository up to date with the remote.
git clone [url]
Creates a local 'clone' of the remote repository located at [url].
git push
Sends all new commits in the local environment to the remote.
git branch [name]
Creates a new branch of the repository from the currently checked-out commit.
git checkout [branch/commit/tag]
Moves the current HEAD to the branch, commit, or tag specified in the argument.
git commit -m [message]
To commit your code is to take changes that you've made to your version of the codebase and add them on to the version existing in the remote repository. In the interest of making certain that all changes are well-documented, proper and detailed commit messages are imperative.