Fun with Git

Colin Law clanlaw at gmail.com
Mon Feb 9 03:44:41 EST 2015


On 8 February 2015 at 22:35, John Ralls <jralls at ceridwen.us> wrote:
>
>> On Feb 7, 2015, at 3:41 PM, David T. <sunfish62 at yahoo.com> wrote:
>>
>> OK, so, I am now duly anointed with Just Enough Knowledge in the GnuCash documentation procedures to be dangerous. Woe is unto the Devel mailing list, as I have run into a couple of Problems.
>>
>> Simply put, I have edited a number of sections in the Guide in response to a number of bugs. I turned in a patch for one of those bugs (634181), but I have other changes that I would like to send in. The patches affect ch_oview.xml and ch_basics.xml. Following the commands in the wiki (git commit -a) suggested that I was going to get a patch with all the changes to both files, but I just wanted one file at a time. I tried “git commit ch_oview.xml”, which seemed to set me up to create the one file patch, but when I issue the next command prescribed in the wiki (“git pull —rebase”), I get the following:
>>
>> dht-retina:C david$ git pull --rebase
>> Cannot pull with rebase: You have unstaged changes.
>> Please commit or stash them.
>>
>> I do not know how to proceed from this.
>
> Now it’s time for you to get dangerous with git. Github has a nice collection of resources at https://help.github.com/articles/good-resources-for-learning-git-and-github/; there’s also Scott Chacon’s excellent book at http://git-scm.com/documentation.
>
> I also highly recommend Atlassian’s free (as in beer) Git GUI SourceTree http://www.sourcetreeapp.com/ which makes tailoring commits really easy.
>
> The immediate answer to your question is `git add`: Use that to put individual files into the index and `git commit` *without* the -a to commit just the files in the index. You can use `git status` to show which files are changed and which files are already in the index.

Also I recommend git gui which shows a graphical interface showing the
changes you have made allows you to mark the ones you want to commit
and commit them.  Also gitk is nice for seeing the history.

Colin



More information about the gnucash-devel mailing list