My first git commit

I did my first git push yesterday (30/04/2009() since GNOME has moved from svn(1)to git(1). First of all, I really do appreciate those who worked on getting git(1) into OpenSolaris; save me having to build them from Spec Files Extra.

Looking at the my bash shell history, I issued the following commands:

git config --global user.name "user name"
git config --global user.email "email-address"

# That set up my basic identification.

git status
git clone git://git.gnome.org/gnome-session

# First mistake, I checked out with read-only permission.

git clone ssh://"username"@git.gnome.org/git/gnome-session

# Checked out properly. Make code changes

git diff

# Look at code diff

git commit gnome-session/gsm-manager.c

# Commit code to local git clone

git push --dry-run

# Tried to push in dry run mode

git push origin HEAD

# finally pushed to master repository.

All the commands use are essentially nicely documented here

After making the commit, received a link from maintainer in how to make commit message more meaningful and conformance.

Just for future commits: http://live.gnome.org/Git/CommitMessages

Lots of useful information can be found here
But I find this one is all that I need for doing my first git push! :)

Comments:

From what I know about Git (not much), it shouldn't matter much whether you did the initial clone from git:// or ssh://; the only difference ought to be a couple of lines in a text file under .git, specifying the default push location.

The interesting question: would it be quicker to figure out what exactly you'd need to do to make the repository cloned over git:// correctly pushable, or would it be faster to make a fresh clone?

(Is my mental arithmetic inaccurate, or is this post form broken?)

Posted by Marius Gedminas on May 02, 2009 at 03:59 PM GMT+00:00 #

Hi Marius,
My knowledge of git is not anymore than you :).
I drew the parallel that a svn checkout without ssh would not allow me to putback. Hence I clone with ssh. git may have the flexibility to change through its configuration files which I am not sure.

May be someone with more git knowledge care to comment ?

-Ghee

Posted by guest on May 05, 2009 at 03:13 AM GMT+00:00 #

If the git central repository (containing the branches of master etc) doesn't recognize your local git user, then it may not push to the central repository. Having correct ssh keys help, although I don't believe that was the case here. Are the user names the same on both git.gnome.org and your local repository?

For reference, here is a clone command for one of my (admittedly simple and crappy) projects:
git clone git://github.com/josegonzalez/coachcms.git

I am only able to push because the user names and such have been setup correctly on both ends.

Posted by Jose Diaz-Gonzalez on May 12, 2009 at 11:28 PM GMT+00:00 #

Jose,
It is in my case. Since I am able to have the same user name and of course I also have to set up ssh keys to make life simple for everyone.

Though I have never tried if the user names are not the same, can you not fake it for git to accept that hence the git-config for the user name at the start?

-Ghee

Posted by Ghee Teo on May 13, 2009 at 11:47 AM GMT+00:00 #

Thanks Jose i followed your advise and solved my problem... :)

Posted by bunions on December 20, 2009 at 08:00 PM GMT+00:00 #

Post a Comment:
  • HTML Syntax: NOT allowed
About

I work in the Desktop Group Site Meter

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today