On 5 March 2015 at 05:33, Stefan Bodewig <bode...@apache.org> wrote:
> On 2015-03-05, sebb AT ASF wrote:
>
>> <<<
>>         git checkout -b release
>> <<<
>
>> I don't understand what "you're on the release branch" means.
>> Is that what the checkout command does? If so, does it have to be done
>> in an empty directory?
>
> Unlike svn, git doesn't branch into different folders of the file
> system.  You switch branches in place.  You issue the "checkout" command
> from inside your working copy and your working tree gets modified to
> reflect the state of the branch.

I don't see how that is different from SVN switch, except that one
does not normally do that.

Does Git switch command remove non-Git files?

>> What is the command to create the release branch?
>
> The -b flag tells checkout to create the branch and switch to it
> afterwards.  It is a shorthand for
>
> git branch release
> git checkout release
>
> where the first command creates the branch (based on the current branch)
> but leaves your working copy on the current branch, the second switches
> to the new branch.
>
>> How does one name a release branch in git?
>
> In the example above it would be named "release".  It is the argument to
> the checkout (or branch) command.

So why does the Git example use a different name from the SVN one?
That is very confusing.

>> "Final tag when using git"
>
>> Do the subsequent commands need to be done in a particular location,
>> e.g. a clean directory?
>
> From inside your working copy.  The initial checkout command ensures you
> are on the release branch, the pull ensures your working copy and the
> remote repo are in sync.  "git tag" (at least the one Bene has shown)
> tags the last commit on the current branch, so this tags the latest
> commit of the release branch.  "-s" tells git to PGP sign the tag
> itself.  The next arg is the name of the tag.

Again, in the case of SVN, a checkout does not necessarily wipe the
directory clean.
If there are any non-versioned (or ignored) files these may be left in place.
This has caused issues on some projects where spurious files have
found their way into release archives.
For this reason it is recommended that SVN checkouts are done into a
new directory.

> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to