Github Cheat Sheet - sammanthp007/Linux-Kernel-Development GitHub Wiki
Remove last commit from remote git repository
git push origin +HEAD^:<name of your branch, most likely 'master'>
Merge one change from an old branch to a new one
git checkout master
git checkout Feature
git pull
git merge master --no-commit --no-ff
# Analyze the changes that will be merged into your Feature
git commit
git push
https://ncona.com/2011/07/how-to-delete-a-commit-in-git-local-and-remote/
Leave your current branch as is, create and checkout a new branch and keep all your changes
git checkout -b <new-branch>
Delete local branch
git branch -d localbranch
Push to remote branch
git push origin localbranch:remotebranch
Delete remote branch
git push origin :remotebranch
- On GitHub, navigate to the main page of the repository.
- In the "Branch" menu, choose the branch that contains your commits.
- To the right of the Branch menu, click New pull request.
- Use the base branch dropdown menu to select the branch you'd like to merge your changes into, then use the compare branch drop-down menu to choose the topic branch you made your changes in.
- Type a title and description for your pull request.
- Click Create pull request.
# not sure though, check it out
git checkout -p <prev head>