Delete a branch after verification from the master

I check the branch named FNB-90from the master. In the branch, FNB-90I made 2 additions, fixations and pressed them on the remote. Then check another branch named FNB-90-CHILDc FNB-90.

and. Now, if in a branch FNB-90, I recommend:

$ git fetch  # will fetch the latest changes on the remote
$ git reset --hard origin/master # will set your local branch to match the representation of the remote just pulled down.

Will it return FNB-90to the original state that I checked? If not, how to do it?

b. If I delete a FNB-90tagged branch ,

$ git branch -d FNB-90
$ git push origin --delete FNB-90

What will happen to the branch FNB-90-CHILD, that is, will it become a direct branch master?

+4
source share
2 answers

Answer: a

Will the FNB-90 return to the original state that I checked?

, origin/master FNB-90 . origin/FNB-90, force push.

N.B. Force push origin/FNB-90 FNB-90.

$ git fetch
$ git checkout FNB-90
$ git reset --hard origin/master

$ git push -f origin FNB-90 

origin/master= origin/FNB-90= local FNB-90 .

, FNB-90-CHILD . ( , )


: b

FNB-90 , FNB-90-CHILD. (HEAD) - . , , .

+1

FNB-90 , ?

, , /.
, , checkout FNB-90 reflog, .

, FNB-90, git push --force reset: , ( reset FNB-90)

+1

Source: https://habr.com/ru/post/1693612/


All Articles