For both, start with git tag or git ls-remote -tags to make a list of tags you want to delete on the remote. Struggling, I found two much faster ways. Up to 100x faster method for thousands of remote tagsĪfter reading through these answers while needing to delete over 11,000 tags, I learned these methods relying or xargs take far too long, unless you have hours to burn. Worse yet, if there were matching refs that can be fast-forwarded, they would have been published prematurely, even if the user feels that they are not ready yet to be pushed out, which would be a real disaster. When we added a syntax sugar " git push remote -delete" ( man) to " git push" ( man) as a synonym to the canonical git push remote ( man) : syntax at f517f1f (" builtin-push: add ( man) -delete as syntactic sugar for :foo",, Git v1.7.0-rc0 - merge), we weren't careful enough to make sure that is not empty.īlindly rewriting " -delete " to " :" means that an empty string results in refspec " :", which is the syntax to ask for "matching" push that does not delete anything. (Merged by Junio C Hamano - gitster - in commit 1400458, ) push: do not turn -delete '' into a matching push See commit 20e4164 () by Junio C Hamano ( gitster). " git push $there -delete" ( man) should have been diagnosed as an error, but instead turned into a matching push, which has been corrected with Git 2.31 (Q1 2021). Git push -delete origin $TAGNAME is the correct approach (in addition of a local delete).īut: make sure to use Git 2.31+ (Q1 2021). Which can also be shortened to: git push origin release-1.0:release-1.0īy omitting the source ref (the part before the colon), you push 'nothing' to the destination, deleting the ref on the remote end. Tags work the same way: git push origin refs/tags/release-1.0:refs/tags/release-1.0 Which because of default paths, can be shortened to: git push origin master:master Pushing a branch, tag, or other ref to a remote repository involves specifying "which repo, what source, what destination?" git push remote-repo source-ref:destination-refĪ real world example where you push your master branch to the origin's master branch is: git push origin refs/heads/master:refs/heads/master If you also need to delete the local tag, use: git tag -delete tagname If you want to make sure that you cannot accidentally remove the branch instead of the tag, you can specify full ref which will never delete a branch: git push origin :refs/tags/tagname Note that git has tag namespace and branch namespace so you may use the same name for a branch and for a tag. Or, more expressively, use the -delete option (or -d if your git version is older than 1.8.0): git push -delete origin tagname In the end, GitKraken will be a great help for managing versions of our projects in a graphic and simplified way.You can push an 'empty' reference to the remote tag name: git push origin :tagname With regard to the tool, it has a free version and a paid version for its PRO version, but generally we will only need the free version to carry out personal projects without many problems, since the functionalities are the same. It has a simple, intuitive and customizable interface, with two themes to choose from: Light and Dark. ![]() Tree with the history of highly functional commits, being able to manage your branches and commits directly on it to have a visual form of the changes you are making.It allows to manage several profiles at the same time.Supports undo and redo functions with one click Keyboard shortcuts.Integrates with a user's GitHub or Bitbucket account, GitLab.Among its most relevant features are the following: It is currently available for Windows, Linux and Mac. Something very interesting about GitKraken, beyond the visual, is that it is multiplatform. In a very simple way we can keep a complete track of our repositories, see branches, tags, create new, all the history of our work, commits and so on. What is GitKraken about? It is a powerful and elegant multiplatform graphical interface for Git developed by Axosoft, as an alternative to the command line. In this article I want to show you some information about GitKraken, a tool that allows us to fulfill these purposes in a graphic and simplified way. GitHub, BitBucket, GitLab, Azure DevOps, are some of the best known managers today. If you are a software developer as a student, professional or passionate, you will surely use a version manager to manage and manage your software projects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |