Fun with Git

Colin Law clanlaw at gmail.com
Tue Feb 10 04:17:29 EST 2015


On 10 February 2015 at 05:36, David T. <sunfish62 at yahoo.com> wrote:
> Thanks for the leads. I have been reading, but the descriptions of how it’s supposed to work aren’t matching my experience. Specifically, the manuals all talk about pushing changes onto the repository—but I don’t have push capabilities with the gnucash-docs repository. Thus, when I get errors about needing to push my changes, I don’t know how to get out of the situation. My realm is “3 ahead”, and I cannot figure out how to proceed. I followed the prompts that said to stash my changes, but now I can’t locate the changes I want to submit for bug 693156. I see the changes in the files on my hard drive, so I know they are there, but for the life of me, I can’t figure out how to get git to get them.

To pick up your stashed changes again use
git stash apply
See http://git-scm.com/book/en/v1/Git-Tools-Stashing for a users
friendly discussion of stashing.

I don't know about your other question.  Are you supposed to push them
at all or are you just supposed to do your work on a local branch on
your PC and send off the patches for those with permissions to push?

Colin

>
> David
>
> On Feb 9, 2015, at 12:44 AM, Colin Law <clanlaw at gmail.com> wrote:
>
>> 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