简体   繁体   中英

Deleting git branch loses audit

If a branch has been deleted in git is it still possible to identify whether specific commits were made on that deleted branch?

From what I have found so far - git branches are merely pointers so deleting them would lose the that specific part of the audit history.

Hoping that I can be proven wrong on this.

thanks,

git branches are merely pointers

Yes and which is exactly why deleting them would delete just the pointer.

If you have merged the branch to your mainline, you no longer need that pointer; but you will always know what all commits were made to that branch individually, unless you explicitly choose to not know the specific changes by asking for a fast-forward merge.

The details of exactly which branch you made your commits to are lost once you merge back to another branch. This is detailed in this post and this .

You shouldn't delete branches which are long running and which you wish to keep track of. The act of deleting a branch is a statement of sorts saying that you don't care about that path but from that point on but just about the code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM