-
Notifications
You must be signed in to change notification settings - Fork 22
How to use Github
Sven Nilsen edited this page Mar 14, 2014
·
2 revisions
Github is a website to share source code and cooperate with other programmers.
Rust is developed using Github and latest source code is available here:
https://github.com/mozilla/rust
Github uses a version control system called 'Git'.
To check whether git is installed:
git --version
If it returns "No command 'git' found", it is not installed.
##Useful Commands
A git branch allows you to work on different versions of the same source.
git add <file> - Stages a file for commitment
git branch <newname> - Creates a new branch
git branch -d <branch> - Deletes a branch
git checkout <branch> - Jumps to branch
git commit - Displays modified files
git commit -m "<message>" - Commits with a message
git diff - Displays modified changes
git merge <branch> - Merges the current branch with a specified branch
git pull <remote> - Pulls changes from remote repository
git push <remote> - Pushes changes to remote repository
git remote add <name> <url> - Adds a remote repository by url