no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionLast revision | |||
— | guide:git [2013/04/23 17:31] – update sourceforge git url squentin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== git ====== | ||
+ | [[http:// | ||
+ | And as gmusicbrowser doesn' | ||
+ | gmusicbrowser git repositories : | ||
+ | * github : http:// | ||
+ | * sourceforge : https:// | ||
+ | |||
+ | this link will download a snapshot of the latest version : http:// | ||
+ | |||
+ | The repository contains 2 branches : | ||
+ | * master : the default branch, that currently contains v1.1.x | ||
+ | * v1.0.x | ||
+ | |||
+ | This mini-guide will show you some basic commands that you will need to follow gmusicbrowser development with git, visit the [[http:// | ||
+ | |||
+ | ===== Initialization ===== | ||
+ | < | ||
+ | will create a " | ||
+ | |||
+ | **All following commands are to be run from this gmusicbrowser folder.** | ||
+ | |||
+ | The default " | ||
+ | < | ||
+ | |||
+ | ===== Running gmusicbrowser ===== | ||
+ | You can run the currently checked-out version simply by running : | ||
+ | < | ||
+ | You can of course run it from any folder by using the full path, for example : | ||
+ | < | ||
+ | |||
+ | You can use the -C gmusicbrowser option to specify an alternate configuration file : | ||
+ | < | ||
+ | |||
+ | ===== Changing version ===== | ||
+ | You can switch between branches or tagged version with the branch name/tag name/hash : | ||
+ | < | ||
+ | releases are tagged with their version number, for example : | ||
+ | < | ||
+ | will check out v1.1.3 | ||
+ | |||
+ | ===== Updating ===== | ||
+ | to sync your repo with the latest changes : | ||
+ | < | ||
+ | |||
+ | then, to update your " | ||
+ | < | ||
+ | git checkout master | ||
+ | git merge | ||
+ | </ | ||
+ | |||
+ | ("git pull" can replace a fetch and a merge) | ||
+ | |||
+ | if you make any modification to tracked files, you won't be able to do checkouts, you'll first need to reset changes with : | ||
+ | < | ||
+ | |||
+ | |||
+ | ===== Translations ===== | ||
+ | To create/ | ||
+ | < | ||
+ | //note that this requires the gettext package// | ||
+ | |||
+ | As this modifies po/*.po you'll need to follow with a | ||
+ | < | ||
+ | To revert the changes to po/*.po files, else git won't let you update the branch or change branch (to prevent the loss of these modifications). | ||
+ | |||
+ | ===== tips ===== | ||
+ | The "git status" | ||
+ | |||
+ | An even better way is to use a command prompt that indicates the current branch, if there are untracked/ | ||
+ | |||
+ | ===== Making local changes ===== | ||
+ | If you want to make small changes to gmusicbrowser' | ||
+ | < | ||
+ | and after you update master with the above instructions, | ||
+ | < | ||
+ | git checkout mybranch | ||
+ | git rebase master | ||
+ | </ | ||
+ | if there are conflicts, you can resolve them manually or use "'' | ||
+ | Do not use rebase on branch you published, as rebase rewrite the history of the branch, use merge instead. | ||
+ | |||
+ | ===== Cloning branches from other repository ===== | ||
+ | You can easily track branches from other repository, for example, to track ochosi' | ||
+ | < | ||
+ | git remote add ochosi git:// | ||
+ | git fetch ochosi | ||
+ | git checkout -b ochosi ochosi/ | ||
+ | </ | ||
+ | The first line creates a new remote named " | ||
+ | |||
+ | The second line fetches the remote' | ||
+ | |||
+ | the third creates a local branch " |