{"thread":{"id":"13570","subject":"Clean master, version tags","startedAt":"2008-05-19T02:21:21Z","lastAt":"2008-05-19T02:31:35Z","messageCount":2,"participants":["Marcus","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"77246","messageId":"8345bd80805181921l36451957s2063395c65a42aea@mail.gmail.com","threadId":"13570","inReplyTo":null,"subject":"Clean master, version tags","fromName":"Marcus","fromEmail":"prima@wordit.com","sentAt":"2008-05-19T02:21:21Z","receivedAt":"2008-05-19T02:21:21Z","isPatch":false,"sender":{"key":"prima@wordit.com","avatar":null},"body":"I created a lot of test files in the master, branch before Iearning\nhow to use branches. How do I safely remove all entries in master. The\nbranch should can be completely cleaned and leave no traces, so we\nhave a fresh start.\n\n2) Is there a tutorial on how to tag versions and use the version name\nas reference?\n\nThanks,\n\nMarcus\n"},{"id":"77247","messageId":"20080519023135.GW29038@spearce.org","threadId":"13570","inReplyTo":"8345bd80805181921l36451957s2063395c65a42aea@mail.gmail.com","subject":"Re: Clean master, version tags","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-05-19T02:31:35Z","receivedAt":"2008-05-19T02:31:35Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Marcus <prima@wordit.com> wrote:\n> I created a lot of test files in the master, branch before Iearning\n> how to use branches. How do I safely remove all entries in master. The\n> branch should can be completely cleaned and leave no traces, so we\n> have a fresh start.\n\nA couple of ways.\n\nYou can checkout the branch, then forcibly reset both the branch\nand your working directory to some other revision, like say\norigin's master.  Note this will overwrite any modified but not\ncommitted files!\n\n  git checkout master\n  git reset --hard origin/master\n\nor delete the branch and recreate it:\n\n  git branch -D master\n  git branch --track master origin/master\n\nor just delete the branch and don't even have a master:\n\n  git branch -D master\n\n \n> 2) Is there a tutorial on how to tag versions and use the version name\n> as reference?\n\nRead git-tag's manpage.  Creating a tag is as easy as:\n\n  git tag -a tagname\n\nthen you can later go back to that version with:\n\n  git checkout tagname\n\nif you have that version checked out you can find out what the\ntag name was:\n\n  git describe\n\nyou can also export that version as a tarball, even if you don't\nhave it checked out:\n\n  git archive --format=tar tagname | gzip >tagname.tar.gz\n\nDoes that help any?  Tag names are treated almost like any other\nrevision identifier (commit SHA-1, branch name, etc.) in git.\n\n-- \nShawn.\n"}]}