Skip to content

Instantly share code, notes, and snippets.

@jenux
Created July 26, 2017 03:39
Show Gist options
  • Select an option

  • Save jenux/434ed52436f65422289e4737a429be4e to your computer and use it in GitHub Desktop.

Select an option

Save jenux/434ed52436f65422289e4737a429be4e to your computer and use it in GitHub Desktop.
git-project-contributing, copy from node contributing

https://github.com/nodejs/node/blob/master/CONTRIBUTING.md

Step 1: Fork

$ git clone [email protected]:username/node.git
$ cd node
$ git remote add upstream https://github.com/nodejs/node.git

Step 2: Branch

$ git checkout -b my-branch -t origin/master

Step 3: Commit

$ git config --global user.name "J. Random User"
$ git config --global user.email "[email protected]"

Commit:

$ git add my/changed/files
$ git commit

Step 4: Rebase

$ git fetch upstream
$ git rebase upstream/master

Step 5: Test

Step 6: Push

$ git push origin

Step 7:

You can push more commits to your branch:

$ git add my/changed/files
$ git commit
$ git push origin my-branch

Or you can rebase against master:

$ git fetch --all
$ git rebase origin/master
$ git push --force-with-lease origin my-branch

Or you can amend the last commit (for example if you want to change the commit log).

$ git add any/changed/files
$ git commit --amend
$ git push --force-with-lease origin my-branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment