Re: [git-users] how to convince git ls-files to include ALL files in repo?

2014-11-04 Thread Sam Roberts
Thank you! I arrived at this to re-run a command (often unit tests) when any git-controlled file changes: ``` #!/bin/sh set -e git ls-files $(git rev-parse --show-cdup) | entr -cr "$@" ``` -- You received this message because you are subscribed to the Google Groups "Git for human beings" group.

[git-users] how to convince git ls-files to include ALL files in repo?

2014-10-31 Thread Sam Roberts
I want to get a list, relative to my current working directory (which may be below the project root) of all files, including ones added with `git add -N`, but not including any files not under version control... git ls-files almost works... but only lists files from . down. Is there a simple comma

Re: [git-users] Why am I getting "You have more than one commit that you are about to submit." ?

2014-10-31 Thread Sam Roberts
I don't know anything about gerrit, but it looks like you did a git pull when you should have done a 'git pull --rebase'. git pull defaults to merging from the origin branch, that is your middle commit 0869, and that is almost always wrong. rebase your branch onto master: git rebase origin/master

Re: [git-users] any suggestions for pruning all upstream branches after a github fork?

2014-10-02 Thread Sam Roberts
On Wed, Oct 1, 2014 at 12:40 AM, Thomas Ferris Nicolaisen wrote: > On Tuesday, September 30, 2014 8:49:11 PM UTC+2, Sam Roberts wrote: > How about this approach: > > (The thing is to avoid GitHub's Fork button, instead create it manually with > only the branches you wan

Re: [git-users] Is it possible to git add a set of files as non-text, irrespective of any .gitattributes files?

2014-10-02 Thread Sam Roberts
On Wed, Oct 1, 2014 at 9:55 AM, Dale R. Worley wrote: >> From: Sam Roberts > I'm no expert here, but how would it "damage the local user's repo"? > All you have to ensure is that the .gitattributes not be part of the > commit, and that during the git-add, it c

[git-users] Is it possible to git add a set of files as non-text, irrespective of any .gitattributes files?

2014-09-30 Thread Sam Roberts
I need to temporarily add a set of text files that come from a unix tar file, and I'm doing it on windows (temporarily, in that I intend to push it to heroku). I can't get around the LF will be converted to CRLF warning. The problem is I don't control the format of the files I'm adding, I don't wa

Re: [git-users] any suggestions for pruning all upstream branches after a github fork?

2014-09-30 Thread Sam Roberts
Thanks for your help, folks, you had very detailed responses, but I was not clear enough, I am well aware of the difference between local and remote. I want to delete *remote* branches in repo A that are also in *remote* repo B. I guess you two don't use github, but if you fork a repo that has ma

[git-users] any suggestions for pruning all upstream branches after a github fork?

2014-09-29 Thread Sam Roberts
Basically, I'd like to delete every branch in my fork of an upstream repo that is the same as an upstream branch. With sufficient scripting, I can write something to enumerate and compare branch heads, but I'm hoping someone knows of a tool that does this, or can point me to some useful git plumbi

Re: [git-users] Re: Is there a short-hand for referring to the first commit?

2014-09-13 Thread Sam Roberts
On Sat, Sep 13, 2014 at 1:40 AM, Konstantin Khomoutov wrote: > git-rebase supports the "--root [BRANCH]" command-line option to refer > to the root commit of the current (or specified) branch. See [1] for more > info. Exactly what I wanted, thank you, Konstantin. Sam -- You received this messa

[git-users] Is there a short-hand for referring to the first commit?

2014-09-12 Thread Sam Roberts
There are shorthands for going back from HEAD, but not for the initial commit, AFAICT. I often want to do this when rebasing, and have come to tagging the initial commit in my repos with INITIAL. Is there a better syntax I'm missing? -- You received this message because you are subscribed to th

Re: [git-users] Feature Request: `git remote prune --all`

2014-07-27 Thread Sam Roberts
>> > I'd like to see the addition of a `git remote prune --all` command >> > option, or something similar. How is this different from `git fetch --all --prune`? -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this gr

[git-users] can git commit-tree be convinced to return an abbreviated commit hash?

2014-06-06 Thread Sam Roberts
I suspect so, and am searching around, but no luck so far. Its mostly cosmetic, but would simplify my scripting a bit. Thanks, Sam -- 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

Re: [git-users] Re: how to add a new commit to the head of a branch, so that the branches have identical content?

2014-05-21 Thread Sam Roberts
On Wed, May 21, 2014 at 9:08 AM, wrote: > Perhaps the following command sequence works for you This looks like a good start, too, thanks everybody. Sam -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group an

Re: [git-users] Re: how to add a new commit to the head of a branch, so that the branches have identical content?

2014-05-21 Thread Sam Roberts
On Wed, May 21, 2014 at 9:08 AM, Bob Hiestand wrote: > It seems strange to use git (or other VCS) to store build products. Seems so, but Heroku, openshift, etc., all accept or require runnable apps to be git pushed. I don't want build products in the dev src tree, of course, only the branch to be

Re: [git-users] Re: how to add a new commit to the head of a branch, so that the branches have identical content?

2014-05-20 Thread Sam Roberts
On Tue, May 20, 2014 at 7:00 PM, Pierre-François CLEMENT wrote: > Okay then, in that case what you need is the --squash option of git-merge. > >> --squash, --no-squash Interesting idea, but I don't think it will work, since I don't want any of the build products from the last commit on the deplo

Re: [git-users] Re: how to add a new commit to the head of a branch, so that the branches have identical content?

2014-05-20 Thread Sam Roberts
pplication. > Le mercredi 21 mai 2014 02:21:42 UTC+2, Sam Roberts a écrit : >> >> I suspect there is an easy way to do this, because every git commit is >> an object that references a tree object that contains a complete >> source tree. I just want to take the tree that is

[git-users] how to add a new commit to the head of a branch, so that the branches have identical content?

2014-05-20 Thread Sam Roberts
I suspect there is an easy way to do this, because every git commit is an object that references a tree object that contains a complete source tree. I just want to take the tree that is at the head of branch SRC, and make a new commit at the head of branch DST that refs the same tree... but I don't

Re: [git-users] can I make two local repos be identical, always, except for current branch?

2013-11-02 Thread Sam Roberts
On Thu, Oct 31, 2013 at 10:19 PM, Huu Da Tran wrote: > You want to have all remote branches to be always sync'ed but not your local > branches? So basically, you want git fetch to update both clones? Yes. I'm tempted to symlink all my .git/remotes/origin to a cache directory. Is that a terribl

Re: [git-users] Re: A few GIT questions.

2013-10-30 Thread Sam Roberts
I don't think you can add desciptions to files, though you can add notes to commits: http://alblue.bandlem.com/2011/11/git-tip-of-week-git-notes.html You have a pretty specific work-flow, I don't think any tool is going to do this out of the box, much less have IDE integration, but using git note

[git-users] can I make two local repos be identical, always, except for current branch?

2013-10-25 Thread Sam Roberts
basically, I've got clones of some expensive-to-build projects (node.js), and I have changes that I want to rebase/cherry-pick onto dev and stable branches. I know I can push to a remote, then pull into my other, and keep the two on different branches so the builds don't get out of date. But, I th

Re: [git-users] prune during fetch, can I make it default for a remote?

2013-08-20 Thread Sam Roberts
On Mon, Aug 19, 2013 at 2:58 AM, Magnus Therning wrote: > On Wed, Aug 14, 2013 at 03:29:10PM -0700, Sam Roberts wrote: >> I don't see anything in the docs (other than a gui.pruneduringfetch). >> I'd be OK with a global default, I think I want this always, but a >

Re: [git-users] Re: Merging two repositories with history and tags/branches

2013-08-16 Thread Sam Roberts
On Fri, Aug 9, 2013 at 12:04 AM, Thomas Ferris Nicolaisen wrote: >> >> What I would like to know is: >> >> Is this at all possible? >> If so, can someone point me in the right direction? git replace: http://stackoverflow.com/questions/6800692/how-do-git-grafts-and-replace-differ-are-grafts-now-d

[git-users] prune during fetch, can I make it default for a remote?

2013-08-14 Thread Sam Roberts
I don't see anything in the docs (other than a gui.pruneduringfetch). I'd be OK with a global default, I think I want this always, but a per/remote option for .git/config would be nice to. Have I missed this somewhere? Sam -- You received this message because you are subscribed to the Google Gr

Re: [git-users] Some advice please, automating a repetitive process.

2013-08-08 Thread Sam Roberts
/bin/sh script with no bash specifics... IMO. set -e at top to make it bail if any command errors. you can even call it "git-do-my-thing" and install in your path, so its possible to call "git do-my-thing" from the command line, it will look like a git command (obviously, use a better name.. :-).

Re: [git-users] How best to show changes from a number of commits?

2013-06-27 Thread Sam Roberts
You have interleaved your changes with others on master? If so, yes, you should have done on a branch. You can cherrypick them all to a branch, and rebase master... but probably noone will thank you for that :-) -- You received this message because you are subscribed to the Google Groups "Git f

Re: [git-users] Git Puzzle: Managing multiple websites based on the same code

2013-06-22 Thread Sam Roberts
On Tue, Jun 18, 2013 at 2:42 PM, Dyske Suematsu wrote: > Currently I manage them with SVN. The original, generic site is in the > "trunk" and for each new client, I create a branch. If I make a change to > the trunk that needs to be propagated to all the branches/sites, I just run > svn merge to m

Re: [git-users] How to handle a frequently changed file that requires a compile that takes 20 mins

2013-06-09 Thread Sam Roberts
On Sun, Jun 9, 2013 at 7:43 PM, robe070 wrote: > Whats an 'fs clone'? sorry, real name is git clone --local, it does hardlinks by default so doesn't copy anything. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from thi

Re: [git-users] How to handle a frequently changed file that requires a compile that takes 20 mins

2013-06-09 Thread Sam Roberts
On Sun, Jun 9, 2013 at 6:39 PM, benoît person wrote: > On 10 June 2013 03:09, robe070 wrote: >> Different branches or submodule won't work. The change to A and CRIT will be >> required soon - but at the request of the receiver, not forced upon you by >> Git. > > You are not forced to pull / push

Re: [git-users] How to handle a frequently changed file that requires a compile that takes 20 mins

2013-06-09 Thread Sam Roberts
On Thu, Jun 6, 2013 at 6:39 PM, robe070 wrote: > One of the issues with our source code is that there is one file that is > critical to our development. If its changed in our working directory then > the entire solution needs to be re-built. We currently avoid this and > usually end up needing to

Re: [git-users] how to protect my source while allowing a new developer to work

2013-06-09 Thread Sam Roberts
On Thu, Jun 6, 2013 at 3:42 PM, benoît person wrote: > From what I know, git does not support branch permissions. The best > way to deal with that kind of permissions-thingy is to create two > repos : a main repo and a fork for your new developer. He would only > have permissions to pull from the

Re: [git-users] Git rebase for cleanup, after pushing

2013-06-02 Thread Sam Roberts
Paul, your story is confusing. Server: master your-feature (tests run on it) If the tests run before the merge into master, then the normal procedure is that after you know the branch tests pass, you rebase your-feature to clean it up, and do a "push -f" to overwrite it. Then people comment, may

[git-users] syncing all branches from github upstream to a fork

2013-05-29 Thread Sam Roberts
When you do a github fork, you get a copy of all branches in the src repo as of the moment of fork, and then they never get updated unless you do it manually, and you never get any new branches. I've been looking at ways to do this. The best I've found so far is: #!/bin/sh # usage: git-sync-upstr