Re: [git-users] adding a remote on a private branch.
Does it work even if the original cloned branch is off of (P), i'm just trying to understand how and why this can work. (Ma) is Machine A (Mb) is Machine B (P) - parent branch Ma - clone P, call it Pa - create private branch Pva in the same tree, i want to set the remote as (Pb) Mb - Clone P, call it Pb I'm just trying to understand if the above is valid configuration ? thanks a lot for your help. On Tuesday, July 21, 2015 at 8:07:13 PM UTC+5:30, Magnus Therning wrote: On Mon, Jul 20, 2015 at 11:51:10PM -0700, dexter ietf wrote: Hi, i want to add a remote for a private branch. i have a parent repository call it (P). and two clones of P on different machines (a) and (b), call it Pa and Pb. now in machine (a) i want to create a private branch tracking Pb, how do i go about achieving this, any help is appreciated.. thanks! Add the remote using `git remote add ...`, then use `git fetch name of remote` to get the changesets, and then just check out the branch you want using `git checkout --track name of remote branch`. You should find this information easily in any online git tutorial, e.g. here http://git-scm.com/book/en/v2/Git-Branching-Remote-Branches /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org javascript: jabber: mag...@therning.org javascript: twitter: magthe http://therning.org/magnus The British have the perfect temperament to be hackers--technically skilled, slightly disrespectful of authority, and just a touch of criminal behavior. -- Mary Ann Davidson, Oracle's Security Chief -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] adding a remote on a private branch.
On Tue, 21 Jul 2015 23:00:23 -0700 (PDT) dexter ietf dexter.i...@gmail.com wrote: Does it work even if the original cloned branch is off of (P), i'm just trying to understand how and why this can work. (Ma) is Machine A (Mb) is Machine B (P) - parent branch Ma - clone P, call it Pa - create private branch Pva in the same tree, i want to set the remote as (Pb) Mb - Clone P, call it Pb I'm just trying to understand if the above is valid configuration ? thanks a lot for your help. I'm afraid you might have terminological issues here: you can't clone branches, you can only clone entire repositories (containing branches). As to whether a branch might track any other *arbitrary* branch -- the answer is yes. Git, on purpose, pays absolutely no attention to the source of the information it manages: the only think it's concerned with is object names (those string representations of SHA-1 hash values). So you might obtain a branch X from a repository A, fork a local branch L off it and then set your L to track arbitrary branch Y fetched from a repository B. X and Y might be the same (in terms of their history) or may be completely different -- Git does not care; just in the latter case `git status` et al will tell you your L and Y are heavily diverged because they contain unrelated disjoint histories. To understand how Git knows whether two branches are related in terms of their histories, and how much they are diverged is easy: to get this information Git uses the same technique as the `git merge-base` command does, so consider reading its manual page. As to tracking a branch by another branch, this information is purely declarative and amounts to a single entry in the .git/config file, which you will easily be able to locate. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] adding a remote on a private branch.
Hi, i want to add a remote for a private branch. i have a parent repository call it (P). and two clones of P on different machines (a) and (b), call it Pa and Pb. now in machine (a) i want to create a private branch tracking Pb, how do i go about achieving this, any help is appreciated.. thanks! -dexter -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] adding a remote on a private branch.
On Mon, Jul 20, 2015 at 11:51:10PM -0700, dexter ietf wrote: Hi, i want to add a remote for a private branch. i have a parent repository call it (P). and two clones of P on different machines (a) and (b), call it Pa and Pb. now in machine (a) i want to create a private branch tracking Pb, how do i go about achieving this, any help is appreciated.. thanks! Add the remote using `git remote add ...`, then use `git fetch name of remote` to get the changesets, and then just check out the branch you want using `git checkout --track name of remote branch`. You should find this information easily in any online git tutorial, e.g. here http://git-scm.com/book/en/v2/Git-Branching-Remote-Branches /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus The British have the perfect temperament to be hackers--technically skilled, slightly disrespectful of authority, and just a touch of criminal behavior. -- Mary Ann Davidson, Oracle's Security Chief -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. signature.asc Description: PGP signature