Last active
August 29, 2015 13:56
-
-
Save hypeJunction/8951972 to your computer and use it in GitHub Desktop.
Working with Elgg Repos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Correct typos and edit commit messages | |
# Helpful when Evan complain about the commit message | |
# Move to your issue branch | |
git checkout issue_branch | |
# Find where the HEAD was when you added a wrong commit message | |
git reflog | |
# Let's say head was HEAD@{5} | |
git rebase -i HEAD@{5} | |
# You will see your editor with the commit history reversed | |
# Press INS and change the word pick to edit or reword next to commit you are trying to update | |
# Press ESC, CTRL+q, type wq! and ENTER | |
# For every commit message you have marked for edit/reword, you will see an editor | |
# Follow above to edit the commit messages | |
# Force push | |
git push --force origin issue_branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rebase your current branch | |
# This applies all commits from the upstream branch to your branch | |
# Useful when the upstream branch has changed since you stared working on your branch | |
# Change master to remote branch branch that you want to make pull request to | |
# Move to your local master | |
git checkout master | |
# Get the latest from the upstream and reset your HEAD to match the upstream branch | |
git fetch upstream | |
git reset ---hard upstream/master | |
# Move to your current branch that consists commits for pull request | |
git checkout issue_branch | |
# Rebase master changes onto your current branch | |
git rebase master | |
# Force push so that your issue branch | |
git push --force origin issue_branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment