when I checkout remote git tag use command like this:
I got error like this:
I can find remote_tag_name when I use git tag command.
CodeWizard
59.2k1212 gold badges7878 silver badges102102 bronze badges
RyanqyRyanqy
2,15533 gold badges1010 silver badges1616 bronze badges
2 AnswersLets first start by explaining what is a tag in git
A tag is used to label and mark a specific commit in the history.
It is usually used to mark release points (eg. v1.0, etc.).
Although a tag may appear similar to branch, a tag, however, does not change.
It points directly to a specific commit in the history.
You will not be able to checkout the tags if it's not locally in your repository so first, you have to
fetch the tags to your local repository.
First, make sure that the tag exists locally by doing
Then check out the tag by running
Instead of
origin use the tags/ prefix.
In this sample you have 2 tags version 1.0 & version 1.1 you can checkout them out with any of the following:
All of the above will do the same since tag is only a pointer to a given commit.
origin: https://backlog.com/git-tutorial/img/post/stepup/capture_stepup4_1_1.png
There are 2 ways to create a tag:
The difference between the 2 is that that the when creating an annotated tag you can add metadata like you have in a git commit:
name, e-mail, date, comment & signature
In order grab the content of a given tag you can use the
checkout command.As explained above tags are like any other commits so we can use checkout and instead of using the SHA-1 simply replace it with the tag_name
Option 1:
Option 2:
Using the clone command
Since git support shallow clone by adding the
--branch to the clone command we can use the tag name instead of the branch name. Git knows how to 'translate' the given SHA-1 to the relevant commit
git clone --branch=
--branch can also take tags and detaches the HEAD at that commit in the resulting repository.
59.2k1212 gold badges7878 silver badges102102 bronze badges
(This answer took a while to write, and codeWizard's answer is correct in aim and essence, but not entirely complete, so I'll post this anyway.)
There is no such thing as a 'remote Git tag'. There are only 'tags'. I point all this out not to be pedantic,1 but because there is a great deal of confusion about this with casual Git users, and the Git documentation is not very helpful2 to beginners. (It's not clear if the confusion comes because of poor documentation, or the poor documentation comes because this is inherently somewhat confusing, or what.)
There are 'remote branches', more properly called 'remote-tracking branches', but it's worth noting that these are actually local entities. There are no remote tags, though (unless you (re)invent them). There are only local tags, so you need to get the tag locally in order to use it.
The general form for names for specific commits—which Git calls references—is any string starting with
refs/ . A string that starts with refs/heads/ names a branch; a string starting with refs/remotes/ names a remote-tracking branch; and a string starting with refs/tags/ names a tag. The name refs/stash is the stash reference (as used by git stash ; note the lack of a trailing slash).
There are some unusual special-case names that do not begin with
refs/ : HEAD , ORIG_HEAD , MERGE_HEAD , and CHERRY_PICK_HEAD in particular are all also names that may refer to specific commits (though HEAD normally contains the name of a branch, i.e., contains ref: refs/heads/branch ). But in general, references start with refs/ .
One thing Git does to make this confusing is that it allows you to omit the
refs/ , and often the word after refs/ . For instance, you can omit refs/heads/ or refs/tags/ when referring to a local branch or tag—and in fact you must omit refs/heads/ when checking out a local branch! You can do this whenever the result is unambiguous, or—as we just noted—when you must do it (for git checkout branch ).
It's true that references exist not only in your own repository, but also in remote repositories. However, Git gives you access to a remote repository's references only at very specific times: namely, during
fetch and push operations. You can also use git ls-remote or git remote show to see them, but fetch and push are the more interesting points of contact.
Refspecs
During
fetch and push , Git uses strings it calls refspecs to transfer references between the local and remote repository. Thus, it is at these times, and via refspecs, that two Git repositories can get into sync with each other. Once your names are in sync, you can use the same name that someone with the remote uses. There is some special magic here on fetch , though, and it affects both branch names and tag names.
You should think of
git fetch as directing your Git to call up (or perhaps text-message) another Git—the 'remote'—and have a conversation with it. Early in this conversation, the remote lists all of its references: everything in refs/heads/ and everything in refs/tags/ , along with any other references it has. Your Git scans through these and (based on the usual fetch refspec) renames their branches.
Let's take a look at the normal refspec for the remote named
origin :
This refspec instructs your Git to take every name matching
refs/heads/* —i.e., every branch on the remote—and change its name to refs/remotes/origin/* , i.e., keep the matched part the same, changing the branch name (refs/heads/ ) to a remote-tracking branch name (refs/remotes/ , specifically, refs/remotes/origin/ ).
It is through this refspec that
origin 's branches become your remote-tracking branches for remote origin . Branch name becomes remote-tracking branch name, with the name of the remote, in this case origin , included. The plus sign + at the front of the refspec sets the 'force' flag, i.e., your remote-tracking branch will be updated to match the remote's branch name, regardless of what it takes to make it match. (Without the + , branch updates are limited to 'fast forward' changes, and tag updates are simply ignored since Git version 1.8.2 or so—before then the same fast-forward rules applied.)
Tags
But what about tags? There's no refspec for them—at least, not by default. You can set one, in which case the form of the refspec is up to you; or you can run
git fetch --tags . Using --tags has the effect of adding refs/tags/*:refs/tags/* to the refspec, i.e., it brings over all tags (--tags forcibly updates your tags from the remote's tags, as if the refspec read +refs/tags/*:refs/tags/* ; this may be a difference in behavior from an earlier version of Git).
Note that there is no renaming here: if remote
origin has tag xyzzy , and you don't, and you git fetch origin 'refs/tags/*:refs/tags/*' , you get refs/tags/xyzzy added to your repository (pointing to the same commit as on the remote). If you use +refs/tags/*:refs/tags/* then your tag xyzzy , if you have one, is replaced by the one from origin . That is, the + force flag on a refspec means 'replace my reference's value with the one my Git gets from their Git'.
Automagic tags during fetch
For historical reasons,3 if you use neither the
--tags option nor the --no-tags option, git fetch takes special action. Remember that we said above that the remote starts by displaying to your local Git all of its references, whether your local Git wants to see them or not.4 Your Git takes note of all the tags it sees at this point.
Edit, Jan 2017: testing shows that the behavior in Git 2.10 is now: If their Git provides a tag named T, and you do not have a tag named T, and the commit ID associated with T is an ancestor of one of their branches that your
git fetch is examining, your Git adds T to your tags with or without --tags . Adding --tags causes your Git to obtain all their tags, and also force update.
Bottom line
You may have to use
git fetch --tags to get their tags. If their tag names conflict with your existing tag names, you may (depending on Git version) even have to delete (or rename) some of your tags, and then run git fetch --tags , to get their tags. Since tags—unlike remote branches—do not have automatic renaming, your tag names must match their tag names, which is why you can have issues with conflicts.
In most normal cases, though, a simple
git fetch will do the job, bringing over their commits and their matching tags, and since they—whoever they are—will tag commits at the time they publish those commits, you will keep up with their tags. If you don't make your own tags, nor mix their repository and other repositories (via multiple remotes), you won't have any tag name collisions either, so you won't have to fuss with deleting or renaming tags in order to obtain their tags.
When you need qualified names
I mentioned above that you can omit
refs/ almost always, and refs/heads/ and refs/tags/ and so on most of the time. But when can't you?
The complete (or near-complete anyway) answer is in the
gitrevisions documentation. Git will resolve a name to a commit ID using the six-step sequence given in the link. Curiously, tags override branches: if there is a tag xyzzy and a branch xyzzy , and they point to different commits, then:
will give you the ID to which the tag points. However—and this is what's missing from
gitrevisions --git checkout prefers branch names, so git checkout xyzzy will put you on the branch, disregarding the tag.
In case of ambiguity, you can almost always spell out the ref name using its full name,
refs/heads/xyzzy or refs/tags/xyzzy . (Note that this does work with git checkout , but in a perhaps unexpected manner: git checkout refs/heads/xyzzy causes a detached-HEAD checkout rather than a branch checkout. This is why you just have to note that git checkout will use the short name as a branch name first: that's how you check out the branch xyzzy even if the tag xyzzy exists. If you want to check out the tag, you can use refs/tags/xyzzy .)
Because (as
gitrevisions notes) Git will try refs/name , you can also simply write tags/xyzzy to identify the commit tagged xyzzy . (If someone has managed to write a valid reference named xyzzy into $GIT_DIR , however, this will resolve as $GIT_DIR/xyzzy . But normally only the various *HEAD names should be in $GIT_DIR .)
1Okay, okay, 'not just to be pedantic'. :-)
2Some would say 'very not-helpful', and I would tend to agree, actually.
3Basically,
git fetch , and the whole concept of remotes and refspecs, was a bit of a late addition to Git, happening around the time of Git 1.5. Before then there were just some ad-hoc special cases, and tag-fetching was one of them, so it got grandfathered in via special code.
4If it helps, think of the remote Git as a flasher, in the slang meaning.
Community♦
torek
Tagexists Unable To Activate Specified Tag Intouch Accounttorek
213k2121 gold badges276276 silver badges361361 bronze badges
Not the answer you're looking for? Browse other questions tagged gitgit-checkoutgit-tag or ask your own question.
Although considered an improvement in most respects over Windows 8, Microsoft’s upcoming Windows 10 — set to launch Wednesday, July 29th — curiously changes course on a relatively useful and important feature: System Restore. Read on to find out why System Restore may be one of the first things you’ll want to enable after upgrading to Windows 10.
Getting to Know System Restore
First introduced more than 15 years ago as part of Windows ME, System Restore tracks software installations, driver changes, and software updates, and allows a user to revert their PC to a prior state if one of the aforementioned events causes a problem. For example, System Restore can make a backup of a PC’s graphics card driver just before a new driver is installed. If that new driver causes an issue — e.g., distorted colors, reduced resolution, or a blank screen — the user can initiate a System Restore procedure that will revert Windows back to the original working graphics driver.
By default, Windows will create a record of the changes introduced by a system or software event — something called a restore point — automatically as changes occur on a user’s PC. Users also have the option of manually creating restore points at any time, and are advised to do so before performing major upgrades or changes to the system.
Although sometimes likened to features like Time Machine in OS X, it’s important to note that System Restore isn’t a “backup” utility, at least not in the usual sense. It’s true that System Restore backs up important files related to Windows, such as registry files, drive and boot configurations, and hardware drivers, but the feature won’t back up your user data such as documents, music, or movies. Think of System Restore as backup for your computer — the files that keep the system functioning, regardless of user data — rather than backup for you.
The feature wasn’t perfect, of course, didn’t always work as intended, and required users to reserve a portion of each drive on which System Restore was enabled, but it was a handy and relatively easy to use safety measure that saved countless Windows users from bad drivers and botched upgrades.
But the true beauty of System Restore, as many computer repair technicians will attest, was that it was enabled by default on all recent versions of Windows. This often made software repairs for novice users much easier, as these users didn’t even know that System Restore was enabled on their PC, silently protecting them when they made the mistake of thinking that deleting their chipset drivers was a good idea.
As we’ve recently learned, however, that changes in Windows 10.
System Restore in Windows 10
The good news first: System Restore is available and fully functional in Windows 10. As we mentioned above, however, the bad news is that this feature is turned off by default. Even worse, the interface to enable and manage System Restore is relatively hidden in the legacy Control Panel, and isn’t something that a typical user will stumble upon while browsing the new Windows 10 Settings app. That leaves users on their own to eventually discover the feature, hear about it from colleagues, or find an article like this one on the Web.
While there are new update and restore features built in to Windows 10, including the option to roll the system back entirely to the previous version of Windows, System Restore may still be a good choice for many users. Here’s how you can enable System Restore in Windows 10.
The easiest way to find the System Restore configuration window in Windows 10 is to simply search for it via the Start Menu. Just click on the Search or Cortana icon in your desktop taskbar, or tap the Windows Key on your keyboard, and type System Restore.
You’ll see a search result appear labeled Create a restore point. Click it and you’ll be taken directly to the System Protection tab of the System Properties window, which is where System Restore options are located. Ps4 pro dolby or dts. Alternatively, you can navigate to this same location via Control Panel > System > System Protection.
If you’ve used System Restore in a previous version of Windows, you’ll recognize the interface. All eligible drives will be listed in the “Protection Settings” portion of the window, and you’ll need to manually enable System Restore on each drive you want protected. Due to the nature of System Restore, however, most users will only need to enable it on their primary C drive to gain adequate protection.
To enable System Restore in Windows 10, select your desired drive from the list and click Configure. In the new window that appears, click the option labeled Turn on system protection.
System Restore is useless without drive space in which to store its restore points, of course, so you’ll also need to reserve a portion of your drive for this purpose in the Disk Space Usage section of the window. As you drag the slider to the right, you’ll see the designated usage space represented both in actual size as well as a percentage of your drive. The more space you assign to System Restore, the more restore points you’ll have at your disposal in the event of a critical system issue. Assigning too much space, however, limits what’s available to you for applications and user data, so be sure to strike a good balance. On all but the smallest of drives, we recommend reserving at least 10GB for System Restore.
With your changes made, click Apply and then OK to save your new configuration and close the window. System Restore will now be enabled for your selected drive, and you can let it operate automatically in the background or manually create restore points as desired. If you ever encounter an issue and need to perform a System Restore, just head back to this same window and click System Restore to launch the restore interface. Of note, in the event of catastrophic issues where Windows is no longer bootable, you can access your system restore points from the Windows 10 recovery environment.
Why System Restore is Important in Windows 10
As we mentioned earlier, System Restore has served an important role for many users over the past 15 years of Windows, but it may be especially important for Windows 10 users in mission critical environments. In the lead up to the launch of Windows 10, Microsoft has revealed that most Windows 10 users will be required to apply system updates via the Windows Update service.
Microsoft has long used Windows Update to deliver security patches, bug fixes, and new features to users, and most users were strongly urged to accept the updates as they became available. But a measurable number of Windows users failed to update in a timely manner, and there was nothing Microsoft could do to force these users to upgrade.
Some users had good reasons to delay or avoid applying Windows updates: updates could potentially conflict with certain software or hardware, particularly in large businesses where custom software and configurations are common, and some updates were known to have bugs that caused crashes or system instability. Other users simply neglected proper maintenance procedures and chose to leave their PCs unpatched.
Whatever the reason for avoiding Windows Updates, large numbers of Windows installations are currently running without the latest updates, a problem that creates a significant security vulnerability and one that Microsoft seeks to fix with Windows 10. Here’s how the Windows 10 update situation breaks down:
For all intents and purposes, there are three versions of Windows 10 that will be running on PCs this year: Windows 10 Home, Windows 10 Pro, and Windows 10 Enterprise. Most consumers will get their free upgrade to Windows 10 Home or Pro based on the version of Windows 7 or 8 they are currently running.
When it comes to Windows updates, Windows 10 Home users will be required by the Windows EULA to accept and install all security and feature updates that Microsoft releases. Some options exist to delay the installation of these updates for a short period of time, but Windows 10 Home users will get all Windows updates soon after they are released.
Windows 10 Pro users, on the other hand, have a little bit more flexibility, but it comes with a pretty big catch. These users can defer Windows updates for up to 8 months by electing to join the Current Branch for Business (CBB), an update roadmap intended for businesses that need to manage and schedule updates for large groups of mission critical systems. Beyond that maximum 8-month staging period, however, Windows 10 Pro users won’t be able to receive any future security fixes or feature improvements until they’ve accepted all previous updates.
Out of these three primary versions of Windows 10, only Windows 10 Enterprise users have the ability to truly defer updates, and they can do so for years while still receiving support from Microsoft. This was a necessary concession by Microsoft, of course, to ensure that enterprise customers have the flexibility to accommodate their unique needs, and Windows 10 Enterprise customers are paying for the privilege, as this version of Windows is ineligible for the free upgrade offer.
This move by Microsoft to force most Windows 10 users to accept updates will likely be a positive change overall — preventing and combating security threats will be easier once the majority of Windows users are running the latest version of the operating system — but it’s sure to cause issues for some users, especially in the early days. That’s where System Restore comes in.
Chances are that you’ll be running a version of Windows 10 covered by Microsoft’s mandatory update policy. In addition to proper user backups (you’re keeping good backups of your data, right?) and the recovery tools included in Windows 10, System Restore can provide another layer of security if one of these upcoming mandatory Windows updates has an inherent problem, or at the very least causes a compatibility issue unique to your PC and configuration. You’ll need to give up a small portion of your drive for system restore points, but it’s likely that you won’t give that small sacrifice a second thought if a future botched update forces you to turn to System Restore.
We hope that Microsoft eventually sorts out this new process for updating Windows, and that future updates are extremely reliable. Until then, however, it’s almost a certainty that some Windows 10 updates will slip through with potentially catastrophic bugs and compatibility issues. Absent abandoning Windows entirely, users will be forced to accept this new reality, and while the vast majority of users will be completely fine, it won’t hurt to have a handy System Restore point standing by in case of trouble.
If when you try to activate Windows 10, you receive an error message that Windows 10 couldn’t be activated, then this post may help you. Maybe you upgraded to Windows 10 or maybe you did a clean install of Windows 10 – or then maybe your Windows 10 blocks product key, even after upgrading first & then clean installing the OS.
Windows 10 product key not working
The way to go about this is Upgrade your Windows 7 or Windows 8.1 to Windows 10. Ensure that it is activated and then if you wish, clean install Windows 10 on the same device. If you directly clean installed Windows 10 and then used your earlier key, it will not work.
Cannot activate Windows 10
If you upgraded to Windows 10 for free from Windows 7 SP1 or Windows 8.1 Update and ended up with a non-activated Windows 10, try this:
Open Settings app > Update & security > Activation. Select Go to Store, and check if a valid license is available for your device. If a license isn’t available, you’ll need to buy Windows from the Store. This post will show you how to check Windows 10 activation status, activate it, or change the product key.
If your key is not accepted and activation fails, then in such scenarios, you may receive error messages like:
Windows Activation fails
Tagexists Unable To Activate Specified Tag Intouch Login
If you have tried to activate your copy of Windows over the Internet, and failed, with perhaps any of the following error codes, like with error code 0x80004005 or 0x8004FE33, you may want to follow this Windows Activation fails tutorial.
Microsoft has also described a few scenarios. See which one applies to you and follow the suggestions made.
Error 0xC004F061 – You upgraded to Windows 10, but didn’t have a previous version, or the correct edition of Windows installed
If you see error 0xC004F061 when you try to activate Windows 10:
You’re using a product key to upgrade to Windows 10, but a previous version of Windows wasn’t installed on your PC. To update, you need to have Windows 8 or Windows 7 already on your PC.
If you formatted or replaced your hard drive, you wouldn’t be able to use a product key to update to Windows 10. You’ll need to install your previous version of Windows, and then reinstall Windows 10.
Error 0xC004C008 – One copy of Windows might have been installed on multiple PCs
If you have one copy of Windows and installed it on more than one PC, activation might not work because the product key has already been used on another PC, or it’s being used on more PCs than the Microsoft Software License Terms allow.
If your product key is being used on more PCs than the Microsoft Software License Terms allow, you’ll need to buy a new product key or the copy of Windows for each of your PCs in order to activate them.
A different version of Windows or the product key might have been used as part of a repair
If you took your PC to a repair shop or to someone who builds and fixes PCs, it’s possible that a different version of Windows was installed to complete a repair. Or, if a different product key was used for your PC during the repair, that key might be blocked if it was used on more PCs than the Microsoft Software License Terms allow.
If Windows was activated before your PC was repaired or rebuilt, then re-entering the product key that came with your PC or original copy of Windows might solve the problem. You can also try reinstalling your original version of Windows.
Hardware changes
If you made substantial hardware changes to your PC, like replacing your motherboard, Windows would not be activated on your PC.
Counterfeit software
If you have a counterfeit copy of Windows that wasn’t published and licensed by Microsoft, activation won’t work because Microsoft won’t be able to create a match between your PC’s hardware profile and your 25-character product key. Find out if your copy of Windows is counterfeit.
Used PC
If you bought a used PC with Windows already installed on it, it’s possible that the product key is being used on more PCs than the Microsoft Software License Terms allow.
Windows 10 Product Key blocked
If Windows 10 blocks your product key, even after upgrading first & then clean installing, then we have a few suggestions to make:
I hope something here helps you.
This list of Windows 10 Activation errors and Windows 10 Upgrade & Installation errors may help you further troubleshoot the issue. Try the Windows 10 Activation Troubleshooter and see if it help you. Advanced users may want to see how to troubleshoot Windows Activation states. See this post if you receive The product key entered does not match any of the Windows images available for installation message during installation.
If nothing helps, you may want to use the built-in Contact Support app to contact Microsoft Support.
Now read about Digital Entitlement and Product Key Activation methods in Windows 10.
TIP: Download this tool to quickly find & fix Windows errors automatically
Related Posts:
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |