[GRLUG] Git 'philosophy'

Zach Dennis zach.dennis at gmail.com
Mon Jan 4 22:03:57 EST 2010


On Mon, Jan 4, 2010 at 3:44 PM, L. V. Lammert <lvl at omnitec.net> wrote:
> At 07:32 PM 12/29/2009 -0500, you wrote:
>>
>> On Fri, Dec 18, 2009 at 11:18 AM, L. V. Lammert <lvl at omnitec.net> wrote:
>>
>> You can have as many repositories as you want. Each repository will
>> typically have a *master* branch. It is very easy to create these and
>> share them.
>
> Thanks to everyone for the info! Can't seem to get the first repository
> working,

I'm not sure what you mean "can't get it working". What do you mean,
*working* ? You can't push, pull, commit, fetch, merge, etc. ?

> .. however:
>
> $ cat .git/config
> [core]
>        repositoryformatversion = 0
>        filemode = true
>        bare = false
>        logallrefupdates = true
> [remote "devel"]
>        url = ssh://apollo/u/SCM/EWR/rcpd
>        fetch = +refs/heads/*:refs/remotes/devel/*
>
> Made some changes, .. tried to get .gitignore to actually ignore .Po's, but
> it won't:
>
> $ cat .gitignore
> # Ignore object files
> *.o
> *.Po
> *.Po
> src/.deps/*.Po
>
> $ git status
> # On branch master
> # Changed but not updated:
> #
> #       modified:   src/.deps/FastAz.Po
> #       modified:   src/.deps/SysLog.Po
>
> Is there any simple reason why git refused to ignore .Po's, while it *does*
> ignore .o's?

If you look at the output the .Po files listed are "modified". This
means that at one point they were committed to the repository. Git
will only ignore content it doesn't know about. If you've previously
committed files and now want to ignore them you need to run "git rm
...." so git doesn't track them, and then it will ignore them.

Be sure to check out http://www.gitready.com

Specifically, this post provides more explanation on your exact
problem: http://www.gitready.com/beginner/2009/03/06/ignoring-doesnt-remove-a-file.html

>
> Also, I can't seem to find where the 'complaints' are logged:
>
> $ git push devel master
> To ssh://apollo/u/SCM/EWR/rcpd
>  ! [rejected]        master -> master (non-fast forward)
> error: failed to push some refs to 'ssh://apollo/u/SCM/EWR/rcpd'

This means that the remote branch has changes that you do not have
locally. Typically you should "git fetch" and then review the changes
with git log. If they look good, then pull them in, "git pull
--rebase". Then re-push.

>
> Had to do a --force to get past the stumbling block, .. where would I be
> able to figure out what is causing the problem?

Any time a remote branch is rejected its because there are changes you
don't have locally.

-- 
Zach Dennis
http://www.continuousthinking.com (personal)
http://www.mutuallyhuman.com (hire me)
http://ideafoundry.info/behavior-driven-development (first rate BDD training)
@zachdennis (twitter)


More information about the grlug mailing list