- Clone the master repository onto your local machine.
$ git clone [url]
- Create a new branch on your local machine to work on a feature.
$ git checkout -b [new_branch_name]
- Push the branch to github.
$ git push origin [new_branch_name]
- Add a remote for your branch.
$ git remote add [new_remote_name] [git url]
-
Make changes to local files.
-
Stage the changes you want to commit.
$ git add [file_name]
- Commit the changes.
$ git commit -m '[message here]'
- Push the commit to your branch.
$ git push origin [new_branch_name/new_remote_name]
-
You can now submit a pull request and merge these changes into Master on github.
-
Once your changes have been accepted and you are done with this branch, you can delete it.
-
Switch back to the master branch.
$ git checkout master
- Update your local master with the changes from the repository.
$ git pull
- Delete the branch you created.
$ git branch -d [new_branch_name]
- Delete the branch on the remote github repository.
$ git push origin :[new_branch_name]