branches[‘evince’] = ‘master’
So jhbuild downloaded the source to the ‘checkoutroot‘ set in jhbuildrc. You can go there and type ‘git status‘ to see that it is a git repository. After building, I get this:
# On branch master
# Untracked files:
# (use “git add
#
# test-driver
nothing added to commit but untracked files present (use “git add” to track)
Don’t worry about this untracked file. It’s always there (at least for me!).
If you are very brave, you can start making changes right there and then, but it is probably better to create a branch on which you can test and develop stuff without messing up the stable code. To see the existing branches, just type
‘git branch‘ or ‘git branch -v‘.
The -v option will inform you what was the latest commit on each branch. I think it’s useful. You will probably see only one branch, called ‘master’ marked with a *. The * is there to show you that this is the branch you’re at. Go ahead and create another branch with
‘git branch dev‘.
You can replace ‘dev’ with a better name. In my case it is called annotations, since this is evince’s feature I will work on. Check the branches again. See the new one? You can change to this branch using:
‘git checkout dev‘.
So far so good. Let’s say you change something there, and it’s ready to be committed:
‘git commit -a‘.
The -a option will include all the changes to all the previously existing files. Make sure that the code still compiles and runs with the new commit! Check the log:
‘git log‘.
See the commit there? So everything is good. Now what? Well, I doubt you will have permission to push this directly to gnome’s git. Someone needs to revise the changes you made and, at least for the first few changes, you will receive a lot of feedback. But how can they revise your changes if your commit is local? If you are fixing a bug, you can create a patch from your commit and attach it there. For creating a patch from one commit, you need to run:
‘git format-patch -1 sha‘.
Where “sha”
Github has instructions on how to set up a repository (https://help.github.com/articles/create-a-repo). You can follow this until step 1. Don’t create the readme file, you already have files. Instead, go straight to step 3. What you need to do is add the github rep as a remote repository, in parallel with gnome’s git. If you go to the directory where your project is and type
‘git remote -v‘
you will see that you have one remote entry, called origin, that points to gnome’s git. Now create another entry:
‘git remote add github https://github.com/username/yourprojectname.git‘