Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Last committed code was disappeared while I add a new tag for my new commit

Connie Huang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 27, 2018

Hi,

 

I commit code with a tag (today), and the tag was added to last commit (3 days ago). I also found out the last commit's (3 days ago) code is disappeared.  Is it because I add the tag, that causes the code to disappear?

 

Thank you!

 

 

1 answer

0 votes
Shuhrat Dehkanov
Contributor
September 28, 2018

No, tagging does not effect the actual commits. That's, tagging does not add a new commit or delete the existing one.

 

A commit may disappear from the remote repository if force push is enabled on branch and someone has actually made a force push to the said branch. You can see the last activities on the right side of your dashboard - on Recent activity column. If you have not much activity on your repositories, you may be able to see if there was a force push to that repo.

 

In order to prevent force pushes you can disable it in repository settings: go to repo settings -> Workflow -> Branch permissions, press the edit button next to the branch name (usually, master), remove the check mark from "Allow rewriting branch history" box and press the "Save" button.

 

Hope this helps.

Connie Huang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 2, 2018

Thank you Shuhrat!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events