Re: RFC: checkout/temporary branch switch restoring modification times

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

 



Hi,

Justin Frankel wrote:

> git cop master
> ; build
> git cop some-branch-that-affects-lots-of-files
> ; edit some things, commit
> git cop master
> ; build (fast, nothing changed)

Interesting.  I guess the intended use is that you only ever build
on the master branch?

Have you ever tried the contrib/workdir/git-new-workdir script?
I find it fits the use case well for me:

 git clone $repo
 cd repo
 make
 # oh, shoot! I need to try something out real quick.
 cd ..
 git new-workdir repo repo2 origin/master
 cd repo2
 git am patch-to-test
 make
 # okay, back to what I was doing...
 cd ../repo

Maybe it could be helpful for you, too?

Limitations:

 - requires a file system with support for symbolic links
   (I think Pierre Habouzit and Junio discussed changing
   that);

 - workdirs share refs.  If you update master in one
   workdir and another workdir also has master checked
   out, the new changes will appear as staged changes.

 - workdirs do not share HEAD.  "git gc" from one
   workdir can completely trash another if it has a
   detached HEAD pointing to a commit that is not part
   of any local or remote branch.
--
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]