-
Notifications
You must be signed in to change notification settings - Fork 255
Git Guide
Branching will help you create your own copy of Aura to edit and commit to.
Login to github and go to https://github.com/aurajs/aura and press Fork.
Hardcore forking action
git remote add <yourusername> [email protected]:<yourusername>/aura.git
git remote add upstream git://github.com/aurajs/aura.git
git fetch upstream
git checkout -b <yourbranch>
Do your changes
git push <yourusername> <yourbranch>
Continue to iterate through commit
and push
ing to your remote. When ready, create a pull request.
git fetch upstream master
Get up to date with the latest upstream
repository commits.
git rebase upstream/master
See squashing below.
Depending on the context of your changes, it may be asked to squash your commits into one. This will turn your branches' changes into a single diff to be merged. When in doubt, keep your branches' commits as-is and see if a maintainer requests a squash
to keep the git history clean.
git log
to find the latest hash
git rebase -i <hash>
where <hash>
is the most distant place in history you want to squash against (normally it will just be a couple, 1-5 of your own commits in your branch).
See squashing below.
This will open an editor. You can pick
a single commit and change the others you wish to squash
.
After saving, git will check for any conflicts that need to be fixed by hand.
git status
will show uncommitted files which must be fixed. Normally this is going to be between >>>
. Fix the code to where it should be at present. Save it. git add <file>
to add it to the rebase. git rebase --continue
.
When this process is done, you may push it to your branch / PR.
git push --force <yourusername> <yourbranch>
if in detached head state, git push --force <yourusername> HEAD:<yourbranch>
.
See an example example rebase scenario.