[Status]
Accidentally pulling remote branch B to local branch A,
Pushed to remote branch A.
[I want to solve]
Commit content for remote branch B fetched from remote branch A by push
I want to remove it.
In addition, because we are proceeding with renovation after accidentally pulling,
If possible, keep the contents of the current remote branch A
I want to remove only the commit for B minutes. .
If i looked at it yourself,
Return remote repository A to the state it was in before pulling it,
I feel that the best way is to take in the contents of the refurbishment after pulling one by one with cherry-pick. .
If i am an expert and know more efficient ways, it would be helpful if you could teach me.
(* I would also be glad if you provided guidance on branch strategy, etc.)
- github - when i do a git pull, i don't want to update the personally edited configuration files etc to remote ones
- github - how to deal with error cannot lock ref
- Steps to build your own private GitHub repository with GitLab
- github - can't git clone
- github - how to remove a large amount of change history from an "unstage" state
- how to use github
- i want to push local repository data to github
- github - [git] error when cloned with ssh
- xcode project and github repository cannot be linked (?)
- setting your own domain on github pages forcibly returns to the original domain with push
If you just want to undo a file change, use the
revert
command.revert does not delete the commit itself, but creates a new commit that cancels the target commit.
Therefore, please note that the commit log itself cannot be clean.
Use the
rebase
command and the-i
option if you want to make it beautiful.Please be careful when working, as it will not be clean and refreshing.
As for, there is no information on the current branch strategy etc., so I can not advise you.
It is better to refer to
Git flow
,GitHub flow
.