You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug It's may be a feature request
I'm able to create a tag and push it to the origin without having pushed the latest changes done on the branch.
Steps to Reproduce
Merge a branch (develop) into another (master)
Add Tag... -> push the tag
It will be pushed
Analyze on gitlab, (maybe the same on github) everything seems to be working, also have the name of the latest change, let say Merge commit '355c12592f84670268d6b0c71c5c613eb0d9ffe9' but since this one wasn't pushed and only exists locally, the tag will exists in the wrong commit (the former one that was pushed)
Expected Behaviour
Warn if you would really push a tag in an not pushed branch
The text was updated successfully, but these errors were encountered:
I just tested this on GitHub to check it's behaviour compared to GitLab. On a GitHub Remote, it pushes the tag and all necessary commits to GitHub, so the tag ends up being on the correct commit. It seems like it might just be GitLab that's doing an unexpected behaviour.
Git Graph runs the necessary Git commands, based on what the user has requested in the user interface. In this case, it is correctly running git push <remote> <tag-name>. If the Git command was to exit with a non-zero exit code (i.e. Git threw an error), the error is also shown to the user in an error dialog. In your situation, Git is not throwing an error from GitLab, so no error dialog is display to the user. If you ran the same Git command in a terminal, the exact same behaviour would occur.
I definitely agree that it would be worthwhile giving users a simple warning prompt if they're trying to push a tag that's not on a commit on the same remote(s). I've found a suitable Git command that can be used to perform this check, as the required information isn't always available in the Git Graph View. I'll implement this in the upcoming release.
mhutchie
changed the title
Able to push tag on not pushed commit
Display a warning before pushing a tag that's not on a commit on the same remote(s)
May 9, 2021
Describe the Bug
It's may be a feature request
I'm able to create a tag and push it to the origin without having pushed the latest changes done on the branch.
Steps to Reproduce
Merge commit '355c12592f84670268d6b0c71c5c613eb0d9ffe9'
but since this one wasn't pushed and only exists locally, the tag will exists in the wrong commit (the former one that was pushed)Expected Behaviour
Warn if you would really push a tag in an not pushed branch
The text was updated successfully, but these errors were encountered: