How to use tags for versioning in git gui

前端 未结 5 1300
我寻月下人不归
我寻月下人不归 2020-12-15 18:47

I\'m a complete and utter noob, so be gentle!

I\'m using git gui, and never touching the command line interface. I\'m a noob, and some of the people i\'m working wi

相关标签:
5条回答
  • 2020-12-15 19:23

    If you want to add tag with Tortoise GIT:

    1. show log
    2. right click on commit and create tag at this version
    3. push with checked include tags

    If you want to remove tag via Tortoise GIT:

    1. show log
    2. right click on commit and delete refs/tags/x.y.z
    3. push with empty local branch field and enter your tag name into the remote branch field
    0 讨论(0)
  • 2020-12-15 19:25

    I started gitk from Git Gui, highlighted a commit (initial commit in the example below) by left clicking on it, and then right clicked on the selected commit to produce the pop-down menu shown, where the Create tag option is shown, highlighted.

    A pop-up then appeared as shown further below.

    How to tag using Git's GUI

    maketag

    0 讨论(0)
  • 2020-12-15 19:29

    You want to use gitk, available by Repository->Visualize…

    In the top pane, right click on the commit you want to tag at, and select create tag.

    In the git model, you do not typically have tags checked out to disk under the same repository. You could have multiple repositories (all cloned from upstream) or the not suggested multiple working directories at different revisions with one revision, but most times simply using git's tool obviates the need to have multiple versions checked out at the same time.

    What you are suggesting is nothing like the gitflow model, so I don't recommend using that as a reference. Read the ProGit book, http://progit.org for good advice and a few other workflows. I use one which is none of the above.

    Typically you tag at major milestones. I tag when a piece of code becomes customer visible, or when we have code ready to move into formal QA practices. There is typically no need to tag as reminders of when things happened. That is what commit messages are for.

    0 讨论(0)
  • 2020-12-15 19:30

    Thanks for the help fellas.

    I managed to add tags using the method described above

    You want to use gitk, available by Repository->Visualize…

    In the top pane, right click on the commit you want to tag at, and select create tag.

    I then had the problem that my tags were not being included in the push. Therefore, any tags I added were only stored locally, and useless for collaboration.

    The last step in the process is to take one more step when you push...

    When you click push, a window pops up, the bottom check box says "include tags in push". Tick this box, and you should be away laughing!

    0 讨论(0)
  • 2020-12-15 19:36

    I was more interested in deleting a tag through the interface. I could not find how to do that using Git GUI, so I had to run this command on the command-line.

    git tag -d [nameoftag]
    
    0 讨论(0)
提交回复
热议问题