- Fork this repository
- Clone the fork (not the main repository)
- Add a remote "upstream" to point to this repository
Start addressing some issues!
- Make a Branch
- Make a commit on your branch
- Push to origin
- Make your first pull request!
Configure your set up using the following commands::
$ git config --global user.name "Your Name"
$ git config --global user.email youremail@example.com
$ git config --global color.ui auto
Remember to use the same email address that you use for github.
To check the branch you are on::
$ git branch -v
To make a new branch from current branch::
$ git branch cool-feature
To change to cool-feature
branch::
$ git checkout cool-feature
To check the changes since last commit::
$ git diff
To add a file to the staging area::
$ git add <filename>
To check which files are staged, tracked, or untracked::
$ git status
To make a commit::
$ git commit -m "My new feature"
To check history of commits::
$ git log
Get list of remotes::
$ git remote -v
Set up "origin" (your fork) and "upstream" remotes::
$ git remote add upstream https://github.com/whynhow/intro-git.git
Push a branch cool-feature
to your fork::
$ git push origin cool-feature