Re: Branches & directories
- From
- Hilco Wijbenga <hilco.wijbenga@gmail.com>
- Date
- Aug 21, 2011, 23:35 UTC
- Message-ID
- <CAE1pOi0b2w8t53U7PSvVwVxZF9O0HTyfCR4vy+-baBjqCDeNJA@mail.gmail.com>
- In-Reply-To
- <CAMOZ1BvHKTPPmfB7Jx+y4OeRv-uwjmQkscXaRr-vEEy30G_Kdw@mail.gmail.com>
On 21 August 2011 16:06, Michael Witten <mfwitten@gmail.com> wrote:
Show 12 quoted lines
> On Sun, Aug 21, 2011 at 21:37, Hilco Wijbenga <hilco.wijbenga@gmail.com> wrote: >> On 21 August 2011 13:53, Michael Witten <mfwitten@gmail.com> wrote: >>> On Sun, Aug 21, 2011 at 13:42 -0700, Hilco Wijbenga >>> <hilco.wijbenga@gmail.com> wrote: >>>> Isn't a branch simply a way to track changes separately? >>> >>> Well, what does that mean, really? You can certainly use branches to >>> help you achieve that goal. >> >> It means my commits are chained together separate from, say, master. > > Well, that's not what a git branch provides in general.
Er, so what *does* a Git branch provide then?
Show 9 quoted lines
>> I feel like we're talking in circles. I get (and even agree with) what >> you're saying but I don't see how it changes the concept of a branch. >> >> In any case, what I'm more interested in is knowing whether we can >> (optionally) add state (i.e. untracked/ignored files and unstaged >> changes) to a branch. > > No, because a branch doesn't IN ANY WAY provide the structure for that > kind of thing.
Obviously, we'd need to expand that structure.
I tried (ab)using git stash to get what I want but it ignores untracked/ignored files (not a big surprise, of course). It seems the functionality is almost there. If I could just combine git checkout with git stash (and have it work with untracked/ignored files) in a script or alias, I'd be a happy camper. I'll have to give it some more thought.
> Of course, you could use what git calls a 'branch' in > order to implement what you imply is a 'branch', but git's concept of > a branch and your concept of a branch are not at all the same concept > (which is why the term 'branch' is so unfortunate).
You've completely lost me. You may very well be right but all I see is that you're pointing out how branches are implemented in Git.