0

Suppose i have the git repo

Now one of the user has merged with master and message i see is the squashed commit of the following

Now when i click on that commit in bitbucket then i see 15 different commits with their message and hash

Now i can click on them individually and see individual commits

Now i want to know that does those grouped commits be there on repo forever or they will be deleted with time

user3113427
  • 455
  • 1
  • 6
  • 17

2 Answers2

0

They will be there forever. That's how git has been designed.

gravetii
  • 9,273
  • 9
  • 56
  • 75
  • then why people say that commits which are squashed can be deleted after 30 days – user3113427 Jan 22 '14 at 05:03
  • Only "abandoned" commits (commits with no labels pointing to them) eventually expire. Git commands that "move labels" (rebase and reset are two such) can result in abandoned commits. If you do a squash-"merge", *and* then delete the branch label on the branch that has been "squashed in", the abandoned commits eventually go away. (And: repositories with no reflogs—some "bare" ones, for instance—can have abandoned commits go away quickly.) – torek Jan 22 '14 at 06:38
0

This shows how to delete a Git commit, but I'm assuming it uses Git Shell. Here's something that might help.

Community
  • 1
  • 1
wasimsandhu
  • 4,296
  • 9
  • 27
  • 40