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.)
Answer # 1
If you just want to undo a file change, use the
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.
rebasecommand and the
-ioption if you want to make it beautiful.
Please be careful when working, as it will not be clean and refreshing.
(* I would also be happy if you also provided guidance on branch strategy, etc.)
, there is no information on the current branch strategy etc., so I can not advise you.
It is better to refer to
- github - how to hide only the db password
- how to link github with ssh from xcode
- github - how to do aws cdk using git template
- cannot pull from vs code to github
- github - how does git checkout work?
- how to use github
- github - how to modify local path of img src?
- github - how to cancel git reset --hard orig_head
- github - cancel marge commit? want to
- 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 remove a large amount of change history from an "unstage" state
- github - how to deal with error cannot lock ref
- Steps to build your own private GitHub repository with GitLab
- github - can't put in gitconfig
- github - can't git clone
- attempting to push when using multiple github accounts is denied by another account
- Solution to fatal: remote error: You can't push to git: //githubcom/username/*git
- How to connect to github via ssh using git in vscode