Git.md 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](http://git-scm.com) is the most popular [distributed revision
control
9 10 11 12
system](http://en.wikipedia.org/wiki/Distributed_revision_control). 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.
13

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](http://git-scm.com/documentation) and [git
ready](http://gitready.com).
18 19


20
## Sending changes around
21

22 23 24 25
As can be seen in the [development workflow](Development_workflow.md),
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:
26

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


32
## When to use git pull
33

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.
40

41 42 43 44
When working on a task, assuming you're following the [development
workflow](Development_workflow.md), 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`.
45

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


51
## Not going insane
52

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](https://wiki.gnome.org/Apps/Gitg) (tailored for GNOME, with a
really nice interface).
57

58 59
[Meld](http://meldmerge.org) can be very useful for reviewing a large
change to be committed.
60

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