[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with git push and pull
From: |
Reinhold Kainhofer |
Subject: |
Re: problems with git push and pull |
Date: |
Sun, 21 Aug 2011 20:52:40 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.38-10-generic; KDE/4.7.0; i686; ; ) |
Am Sunday, 21. August 2011, 20:30:09 schrieb Janek Warchoł:
> As a nice inauguration of me having git push ability, i broke my
> repository :) git pull seems not to work properly.
>
> Here's what i did:
> - in step 6 from here
> http://lilypond.org/doc/v2.15/Documentation/contributor/commit-access
> i mistakenly called
> config remote.origin.url \
> ssh://address@hidden/srv/git/lilypond.git
> (i.e. i didn't replace 'user' with my username)
> - when i tried to call it again properly, it refused to work
> - so i opened .git/config and deleted some lines - apparently too many
> (that was very smart of me!), after doing so i was able to perform
> step 6 properly
You could have simply changed user to your login in the .git/config file. No
need to delete lines there... The "git config" does really nothing else than
adding/changing lines in .git/config!
> - followed remaining steps
> - called git pull -r on master
> - checked out a new branch
> - made changes to authors.itexi (i.e. added myself to develoopment
> team) and committed them
> - called 'git push' (while still being on that new branch)
Your commit 32c3ef2b7cdde3abc72738f0173b78f8d28d65c3 ("add Janek Warchol to
authors") is the current origin/master... Seems to have worked!
> - checked out master
> - called 'git pull -r'.
> I was pretty sure that in this moment my local master, my new branch
> and origin/master were all the same. However, when i called 'git diff
> origin/master' it showed a lot of differences, including difference in
> authors.itexi :( When i call git log, here's what i see:
What does
git status
say?
Did the "git pull" give any messages? In particular, if there are rebase
problems, you'll have to resolve them, do "git add [file-name-comes-here]" and
then continue the rebase with "git rebase --continue". Remember, "git pull -r"
is the same as "git fetch; git rebase origin/master", so you also need to know
how to work with rebase (and how to resolve conflicts).
Quite useful is also "git branch"...
BTW, I'm using qgit as graphical frontend, where you can easily see all
branches, all tags, or look at each patch separately and even see who last
changed each line of a file.
> And these are the contents of my .git/config:
[...]
> [remote "origin"]
> url = ssh://address@hidden/srv/git/lilypond.git
Here I also have:
fetch = +refs/heads/*:refs/remotes/origin/*
That is not really required if you only intend to work with origin/master. It
just causes "git fetch" to download all branches on the server (e.g. the
translations branch, the 2.14 branch, the developer branches, etc.).
--
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org