2.19 KB
Newer Older
1 2 3 4 5
short-description: Specifics of using Git in Pitivi

# Using Git in Pitivi
6 7 8

[Git]( is the most popular [distributed revision
9 10 11 12
system]( Git
allows you to get a checkout (with full history) of the Pitivi code, as
a local git repository, and push your changes to a remote repository of
your own, to make them available for others.

14 15 16 17
In this page, we cover **specifics of how we use Git in the Pitivi
project**. For an introduction to Git, see the [official Git
tutorial/documentation page]( and [git
18 19

## Sending changes around

22 23 24 25
As can be seen in the [development workflow](,
we normally don't take care of pushing branches around, as this is done
automatically by git-phab. Once somebody attaches a branch to a task
with git-phab, all of us can try it with:

27 28 29
git-phab fetch T1234 -c
30 31

## When to use git pull

34 35 36 37 38 39
With rare exceptions, in Pitivi we rebase contributed commits before
pushing them to origin/master, to avoid merge commits. This worked fine
and it enforces some discipline, so there is no plan to change it. It's
similar with Phabricator's philosophy (`arc land` squashes all the
commits in the current branch into a single one before pushing to
origin/master) — just that we like to keep control.

41 42 43 44
When working on a task, assuming you're following the [development
workflow](, you should have a specific branch.
To get the latest changes in your branch, normally in Pitivi you should
do something like `git fetch` and `git rebase origin/master`.

46 47 48
It should be safe to use `git pull` on the master branch if you don't
work on it. Just make sure it's exactly what origin/master is and no
merge commit is created.
49 50

## Not going insane

53 54 55 56
It's much easier to understand what's the status of a git branch by
using a graphical tool such as `gitk` or
[gitg]( (tailored for GNOME, with a
really nice interface).

58 59
[Meld]( can be very useful for reviewing a large
change to be committed.

61 62
Set up your prompt to show the current branch info, and make sure
tab-completion works.