Welcome, Guest :: Blog Home | Login | Register

Articles By Tag:
Forcing Git To Ignore File Mode Changes

2009-11-22 18:54:22 Tags: git

Quick note on Git file mode changes...

In situations which require you to change the file mode on your local git repository (example: if you mount a local machine and need to set mode to 777 for user to be able to write file modifications), Git will recognize all files as modified (git status) after mode changes. Here's how we can force Git to ignore mode changes.

Code:
git config core.filemode false


Simple!

`Stephen

[ Comments (0) ]




Remote Git Repository Setup

2009-08-23 20:14:59 Tags: git linux

I've been doing a lot of work moving from SVN to Git for source code version control. The following is a quick and easy how-to for setting up a remote git repository. This example shows how to import an existing SVN repo into a new git repo.

1) [Local machine] Export clean code base from remote SVN repository:

Code:
cd /var/git/
svn export http://svn.domain.com/trunk myapp.git
cd myapp.git
git init
git add .
git commit -m "initial import"


2) [Remote server]: Make remote git repository:

Code:
ssh user@ipaddress
mkdir /var/git/myapp.git && cd /var/git/myapp.git
git --bare init


3) [Local machine] Add/push local repo to remote repo:

Code:
git remote add origin user@ipaddress:/var/git/myapp.git
git push origin master


4) Give out git repo info to developers:

Code:
git clone user@ipaddress:/var/git/myapp.git


That's all that's required for source code versioning via Git. Each developer can now clone from the master branch of the remote server (see step 4) and go to work! More on how to commit revisions soon.

~Stephen

[ Comments (0) ]