Re: [git-users] git pull --rebase ?

2013-11-15 Thread Konstantin Khomoutov
On Thu, 14 Nov 2013 15:03:29 -0800 (PST)
Vicki Kozel vickiko...@gmail.com wrote:

 We've recently switched to Git and Gerrit, and are drafting the best 
 practices workflow for our development team. One thing we want to
 avoid is merge commits that have two parents since if these commits
 fail Gerrit's review it is hard to rebase them. 
 
 I know that git pull will do the fetch + merge that may create
 those two-parent commits. Instead we recommend to do:
 
 on the feature branch:
 
 git fetch
 git rebase origin master
 or
 git pull --rebase origin master
 
 
 The problem with this last command is that it does not put my local
 commit on top of commits from origin. So if I need to amend my last
 local commit - I can't - since it's not on top of history any longer.
 To amend this commit I have to run rebase --interactive, but we are
 trying to avoid commands that are either complicated or numerous. Is
 there a way to run git pull 
 --rebase in such a way that my latest local commit ends up on the top
 of commit history?

Did you try it?

From the git-pull manual:

  -r
  --rebase
  
Rebase the current branch on top of the upstream branch after
  fetching. If there is a remote-tracking branch corresponding to the
  upstream branch and the upstream branch was rebased since last
  fetched, the rebase uses that information to avoid rebasing non-local
  changes. 

The key words are Rebase the current branch on top of the upstream
branch, which means your call

git pull --rebase origin master

would first fetch master from origin then rewind whatever branch you're
currently have checked out to point to the same commit origin/master
now does and then apply the series of commits defined by
yourbranch..origin/master (against the the pre-pull state of
origin/master) to your checked out branch yourbranch.  Should that
succeed, you got your local commits exactly on top -- that's the
essense of rebasing.

-- 
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/groups/opt_out.


Re: [git-users] .gitignore question

2013-11-15 Thread Edwin Castro
On 11/13/13, 6:15 AM, wtriker@gmail.com wrote:
 'someupper path/system/cache' and all start with 'cache.'

Sounds like you want to match any number of directories prior to the
system directory. Try this pattern:

**/system/cache/cache.*

--
Edwin

-- 
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/groups/opt_out.


Re: [git-users] After git -am commit changed files are not in repo

2013-11-15 Thread Dave Kennedy
Solved
I needed to push my changes to the remote repo! 
git push

-- 
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/groups/opt_out.


Re: [git-users] Git commit comment

2013-11-15 Thread Gergely Polonkai
My first guess is that you haven't updated your local repository from
GitHub. Have you issued git pull before viewing your local log?


On 15 November 2013 11:28, nanna nanna.ku...@gmail.com wrote:

 Hi

 I would like to list out the commit comment given on github from command
 line.

 Is it possible to do that?

 I can able to see the comment on particular commit “review done” in
 github.

 But if i browse through git log from cmd, i couldn’t do.


  --
 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/groups/opt_out.


-- 
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/groups/opt_out.


[git-users] Branching with dependencies

2013-11-15 Thread Andrew
Hello,

I'm in the process of moving to Git. Mostly I am very happy but I figure 
out, or find a reference anywhere, of how you deal with multiple 
dependencies in Git. 

My problem: suppose that I have two independent branches A and B, which may 
not even touch the same files. Now I start a new development branch C which 
wants to use features from different commits in A and B. I'd like C to to 
branch off BOTH A and B. I'm not sure that I can draw these fancy branch 
diagrams to the standards of this group, but the situation looks something 
like this:

*--*--*--*--...--* master
|   \-*--*--*--* A
   | |-*--*--*--* C
   |-*--*--*--*--*--* B

Is it possible to do something like this in Git? Am I missing something 
obvious?

To me this seems to be a fairly common scenario, but perhaps it's just 
me:). 

Andrew

-- 
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/groups/opt_out.


Re: [git-users] Branching with dependencies

2013-11-15 Thread Magnus Therning
On Fri, Nov 15, 2013 at 01:33:40PM -0800, Andrew wrote:
 Hello,
 
 I'm in the process of moving to Git. Mostly I am very happy but I
 figure out, or find a reference anywhere, of how you deal with
 multiple dependencies in Git. 
 
 My problem: suppose that I have two independent branches A and B,
 which may not even touch the same files. Now I start a new
 development branch C which wants to use features from different
 commits in A and B. I'd like C to to branch off BOTH A and B. I'm
 not sure that I can draw these fancy branch diagrams to the
 standards of this group, but the situation looks something like
 this:
 
 *--*--*--*--...--* master
   |   \-*--*--*--* A
   | |-*--*--*--* C
   |-*--*--*--*--*--* B
 
 Is it possible to do something like this in Git? Am I missing
 something obvious?

Your illustration got a bit mangled on the way to me, but wouldn't it
basically just be to

 1. branch off A at the point you want
 2. merge in from B up till the point you want

Otherwise, there's always cherry-pick.

How would you accomplish what you ask for in the VCS you currently
use?

/M

-- 
Magnus Therning  OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759


pgpnV16YF6WCQ.pgp
Description: PGP signature