Git usage: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Theuni
No edit summary
>Vdrfan
Line 16: Line 16:
=== Case Insensitive File Systems===
=== Case Insensitive File Systems===
Git wants to run under a case sensitive file system but under OSX and Windows, the file system might be case insensitive. Make sure that core.ignorecase is properly set. Check with:
Git wants to run under a case sensitive file system but under OSX and Windows, the file system might be case insensitive. Make sure that core.ignorecase is properly set. Check with:
<source lang="bash">$ git-config --list</source>
<source lang="bash">$ git config --list</source>
if not set:
if not set:
<source lang="bash">$ git-config --global core.ignorecase true</source>
<source lang="bash">$ git config --global core.ignorecase true</source>


=== Line Endings===
=== Line Endings===

Revision as of 07:36, 5 January 2011

XBMC now uses git for as its main scm. The main repo is located at github

First thing, clone the repo.

  $ git clone [email protected]:xbmc/xbmc.git

Fetch old branches and extra history

The following is ONLY useful for developers who wish to see extended XBMC history. Everyone else should stop here. Run this command from your tree. It requires git 1.6.5 or higher:

$ git fetch origin refs/old/heads/*:refs/remotes/svn-migration/* refs/replace/*:refs/replace/*

Platform Settings

Case Insensitive File Systems

Git wants to run under a case sensitive file system but under OSX and Windows, the file system might be case insensitive. Make sure that core.ignorecase is properly set. Check with:

$ git config --list

if not set:

$ git config --global core.ignorecase true

Line Endings

Windows users MUST use the git autocrlf feature. This is set by default by tortoise. If it's not set, you can do so manually:

$ git config --global core.autocrlf true

Linux and OSX users should set autocrlf to 'input'

$ git config --global core.autocrlf input

Updating

When updating from the main git repo (by default git will call this 'origin'), you should always rebase on top of your history, unless you know what you're doing.

Linux/OSX

Always use

git pull --rebase

A safe bet is to set this to be done automatically.

$ git config branch.master.rebase true

Pushing

Please use

git log

to look at the log before committing. If there are merge commits that you don't understand, please ask for help before pushing.

Never EVER force a push (non-fast-forward commit) to mainline. Ever. Doing so will result in your push privileges being revoked.