linux - Git revert a commit that has some other commit depending on it -


let's have commit a , b, , b depends on a's modification. want revert a, successful? also, happen if line added 'a' no longer present?

git report revert resulted in conflict. git status show unmerged paths.

you can resolve conflict other.


edit example:

$ mkdir foo $ cd foo $ git init $ echo "this line in file" > blah $ echo "this second line in file" >> blah $ echo "this third line in file" >> blah $ git add blah $ git commit -m "first commit" # edit second line in blah $ git commit -am "second commit" # remove second line blah $ git commit -am "third commit" $ git revert head^ #revert second commit error: not revert 4862546... change hint: after resolving conflicts, mark corrected paths hint: 'git add <paths>' or 'git rm <paths>' hint: , commit result 'git commit' $ git status # on branch master # unmerged paths: #   (use "git reset head <file>..." unstage) #   (use "git add <file>..." mark resolution) # #   both modified:      blah # no changes added commit (use "git add" and/or "git commit -a") 

in case first commit added file , second modified file, git status show this:

$ git status # on branch master # unmerged paths: #   (use "git reset head <file>..." unstage) #   (use "git add/rm <file>..." appropriate mark resolution) # #   deleted them:    blah # 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -