Re: [PATCH v2] git-clone: Add option --branch to override initial branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
Tor Arne Vestbø <torarnv@xxxxxxxxx> writes:

If you would like to contribute to the stable 1.6 branch, do:
  $ git clone -n git://git.foo.com/project.git
  $ cd project
  $ git checkout -t origin/1.6
  $ git branch -D master
Which is not so nice and inviting.

If you are working on 1.6 maintenance track, why discard 'master'?

One example I can think of is if master is moving a lot faster than the maintenance track, and you are not interested in master.

[box:/tmp/downstream] $ git branch
* 1.6
  master

[box:/tmp/downstream] $ git pull --rebase
Current branch 1.6 is up to date.

[box:/tmp/downstream] $ git push
To file:///tmp/upstream
 ! [rejected]        master -> master (non-fast forward)
error: failed to push some refs to 'file:///tmp/upstream'

In that case you would either have to ff master all the time (requiring a checkout or rebase magic), or do an explicit "git push origin 1.6".

Neither good options when you are trying to teach people that git push is the way you submit changes.

Tor Arne
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux