I have forked project at github. I make one commit and pull request it. This commit was approved. Then i make second commit and pull request it too. But in pull request there were 2 commits: my second commit and old commit which was approved. How can i sync my repository and main repository?
Hide commit history on Git Branch First, create a new temporary branch and checkout. Now, add all the current files to this temporary branch. Create a new commit. Rename the temporary branch to your old branch name.
You can commit changes on a pull request branch that was created from a fork of your repository with permission from the pull request creator. You can only make commits on pull request branches that: are opened in a repository that you have push access to and that were created from a fork of that repository.
First, remove the commit on your local repository. You can do this using git rebase -i . For example, if it's your last commit, you can do git rebase -i HEAD~2 and delete the second line within the editor window that pops up. Then, force push to GitHub by using git push origin +master .
Merge back from the upstream repository, or create the new pull request on a new branch.
Or rebase on top of upstream:
git remote add upstream (url-for-upstream-repository)
git fetch upstream
git rebase upstream/master
git push -f origin
(do new pull request on website)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With