Re: [git-users] Empty Commit?

2013-10-22 Thread PJ Weisberg
On Tue, Oct 22, 2013 at 1:55 PM, Vicki Kozel wrote: > Hi Marcelo, > I do not want to abandon this change, I want to keep it and the commit > unchanged. I think this is a good practice in Gerrit to keep adding patches > to the same change - to the same commit - which allows for better change > tra

Re: [git-users] Empty Commit?

2013-10-22 Thread Marcelo Avila
But in this special case the amended commit you are planning to push to Gerrit is equal to the original commit you have based in to make your previous commit. You do not need to make the same commit again to fix your change, just abandon it on Gerrit. -- Marcelo Ávila de Oliveira mav...@cpqd.com.b

Re: [git-users] Empty Commit?

2013-10-22 Thread Vicki Kozel
Hi Marcelo, I do not want to abandon this change, I want to keep it and the commit unchanged. I think this is a good practice in Gerrit to keep adding patches to the same change - to the same commit - which allows for better change tracking and tighter code gating. On Tuesday, October 22, 201

Re: [git-users] Empty Commit?

2013-10-22 Thread Marcelo Avila
Hi Vicki, You're trying to amend your commit (which was previously pushed to Gerrit) but your new commit (the amend) would have the exact same tree as its parent commit (see "--allow-empty" item in "git help commit"). In this case, you do NOT need to amend your commit, you just need to abandon the

Re: [git-users] Empty Commit?

2013-10-22 Thread William Seiti Mizuta
Yes, that might be the cause. Then, you can discard the last commit with git reset --hard HEAD^ or create an empty commit with git commit --allow-empty William Seiti Mizuta @williammizuta Caelum | Ensino e Inovação www.caelum.com.br On Tue, Oct 22, 2013 at 2:55 PM, Vicki Kozel wrote: > Also,

Re: [git-users] Empty Commit?

2013-10-22 Thread PJ Weisberg
On Oct 22, 2013 11:21 AM, "Vicki Kozel" wrote: > > This is what git status shows after I modified the file and ran "git add": > > git status > # On branch fix99 > # Changes to be committed: > # (use "git reset HEAD ..." to unstage) > # > # modified: COMMON/pom.xml > # > > > This is what git c

Re: [git-users] Empty Commit?

2013-10-22 Thread Vicki Kozel
Also, my file on the branch that I am amending looks exactly like the file in master. I checked their SHA1 signatures with git hash-object command - they are identical. Maybe that what is causing the problem? On Tuesday, October 22, 2013 11:53:25 AM UTC-7, Vicki Kozel wrote: > > Thank you Willia

Re: [git-users] Empty Commit?

2013-10-22 Thread Vicki Kozel
Thank you William, I just tried that - same outcome. Vicki On Tuesday, October 22, 2013 11:24:29 AM UTC-7, William Seiti Mizuta wrote: > > > On Tue, Oct 22, 2013 at 2:20 PM, Vicki Kozel > > wrote: > >> git commit COMMON/pom.xml --amend > > > You don't need to pass the file in commit command. You

Re: [git-users] Empty Commit?

2013-10-22 Thread William Seiti Mizuta
On Tue, Oct 22, 2013 at 2:20 PM, Vicki Kozel wrote: > git commit COMMON/pom.xml --amend You don't need to pass the file in commit command. You just need to use "git commit --amend" William Seiti Mizuta @williammizuta Caelum | Ensino e Inovação www.caelum.com.br -- You received this message

Re: [git-users] Empty Commit?

2013-10-22 Thread Vicki Kozel
This is what git status shows after I modified the file and ran "git add": git status # On branch fix99 # Changes to be committed: # (use "git reset HEAD ..." to unstage) # # modified: COMMON/pom.xml # This is what git commit with amend shows: git commit COMMON/pom.xml --amend # On branch

Re: [git-users] Empty Commit?

2013-10-22 Thread William Seiti Mizuta
Hi Vicky, have you added your modified files to "changes to be commited" state? What is the output of "git status" command? William Seiti Mizuta @williammizuta Caelum | Ensino e Inovação www.caelum.com.br On Tue, Oct 22, 2013 at 1:01 PM, Vicki Kozel wrote: > Hello, > we are using Git and Ger

[git-users] Empty Commit?

2013-10-22 Thread Vicki Kozel
Hello, we are using Git and Gerrit stack; since Gerrit is good about keeping track of an individual commits(changes), when a commit breaks CI, Gerrit a) prevents the change to be merged into master b)provides a patch branch a developer can checkout and amend the broken commit. I got into the si

Re: [git-users] invert gitignore

2013-10-22 Thread Dale R. Worley
> From: Philipp Kraus > > I use my .gitignore to define files which should not store in the history, > but can I use an invert filter? > So I would define files, which are only stored in the history. So if I > write to the (not)ignore file *.cpp all other file except *.cpp are ignored? > > So

Re: [git-users] invert gitignore

2013-10-22 Thread William Seiti Mizuta
Hi Philipp, you can put the character "!" to negate the pattern: - An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. If a negated pattern matches, this will override lower precedence patterns sources. Put

[git-users] invert gitignore

2013-10-22 Thread Philipp Kraus
Hello, I use my .gitignore to define files which should not store in the history, but can I use an invert filter? So I would define files, which are only stored in the history. So if I write to the (not)ignore file *.cpp all other file except *.cpp are ignored? So I need the invert / complement

[git-users] Re: Issues with git merge into master

2013-10-22 Thread Thomas Ferris Nicolaisen
On Monday, October 21, 2013 3:26:39 PM UTC+2, Shashank Gupta wrote: > We have master and a second branch in our repository. We are merging from > branch to master every few days. Master has almost no new changes at this > time (other than the merge commits), development is happening entirely on

[git-users] Re: Question on Git Hooks

2013-10-22 Thread Thomas Ferris Nicolaisen
On Monday, October 14, 2013 2:50:29 PM UTC+2, Ling wrote: > Hello, > > We are going to integrate the Git with VersionOne and also trying to > create some hooks that prevent when developers trying to commit/push the > changes into the remote repositories, for example: when developer trying to

[git-users] Re: Do I need to track a directory to be able to subtree and push it to a different remote branch?

2013-10-22 Thread Thomas Ferris Nicolaisen
On Saturday, October 12, 2013 11:21:47 AM UTC+2, Tom Alon wrote: > I use one repo with develop and release branches for a Yeoman project. > > Simplified, my directory tree looks like this: > > root git directory > ├── app > └── dist (the build folder) > > > With Grunt.js I build my app straight

[git-users] Re: Error initializing submodule "repositoryname"

2013-10-22 Thread Thomas Ferris Nicolaisen
On Friday, October 11, 2013 5:04:59 PM UTC+2, Jordan Flower wrote: > I'm using Mac OS 10.8.5. In the GitHub Desktop Application I get this > error message when I try to commit: > > *Error initializing submodule "repositoryname"* >> Make sure that the parent repository's .git/config file is writab