From: "Shawn O. Pearce" <spearce@spearce.org>
To: Marcus <prima@wordit.com>
Cc: git@vger.kernel.org
Subject: Re: Clean master, version tags
Date: Sun, 18 May 2008 22:31:35 -0400 [thread overview]
Message-ID: <20080519023135.GW29038@spearce.org> (raw)
In-Reply-To: <8345bd80805181921l36451957s2063395c65a42aea@mail.gmail.com>
Marcus <prima@wordit.com> wrote:
> I created a lot of test files in the master, branch before Iearning
> how to use branches. How do I safely remove all entries in master. The
> branch should can be completely cleaned and leave no traces, so we
> have a fresh start.
A couple of ways.
You can checkout the branch, then forcibly reset both the branch
and your working directory to some other revision, like say
origin's master. Note this will overwrite any modified but not
committed files!
git checkout master
git reset --hard origin/master
or delete the branch and recreate it:
git branch -D master
git branch --track master origin/master
or just delete the branch and don't even have a master:
git branch -D master
> 2) Is there a tutorial on how to tag versions and use the version name
> as reference?
Read git-tag's manpage. Creating a tag is as easy as:
git tag -a tagname
then you can later go back to that version with:
git checkout tagname
if you have that version checked out you can find out what the
tag name was:
git describe
you can also export that version as a tarball, even if you don't
have it checked out:
git archive --format=tar tagname | gzip >tagname.tar.gz
Does that help any? Tag names are treated almost like any other
revision identifier (commit SHA-1, branch name, etc.) in git.
--
Shawn.
prev parent reply other threads:[~2008-05-19 2:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 2:21 Clean master, version tags Marcus
2008-05-19 2:31 ` Shawn O. Pearce [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080519023135.GW29038@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=prima@wordit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).