Skip to content

Instantly share code, notes, and snippets.

@hypeJunction
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hypeJunction/8951972 to your computer and use it in GitHub Desktop.
Save hypeJunction/8951972 to your computer and use it in GitHub Desktop.
Working with Elgg Repos
# 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
# 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