Quick git howto for SVN users:
[email protected]:~/$ git clone ssh://gerrit/trading/code code
[email protected]:~/$ cd code
[email protected]:~/code$ git checkout -b chris_test_branch
[email protected]:~/code$ nano file1 // edit
[email protected]:~/code$ nano file2 // edit
[email protected]:~/code$ git status
# On branch chris_test_branch
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# file1
# file2
nothing added to commit but untracked files present (use "git add" to track)
[email protected]:~/code$ git add file1
[email protected]:~/code$ git add file2
[email protected]:~/code$ git status
# On branch chris_test_branch
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: file1
# new file: file2
#
[email protected]:~/code$ nano file1 // make a further edit, file must be re-added to this commit
[email protected]:~/code$ git status
# On branch chris_test_branch
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: file1
# new file: file2
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: file1
#
[email protected]:~/code$ git add file1
[email protected]:~/code$ git status
# On branch chris_test_branch
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: file1
# new file: file2
#
[email protected]:~/code$ git commit
[chris_test_branch e946a4e] New files added to project
2 files changed, 66 insertions(+), 0 deletions(-)
create mode 100644 file1
create mode 100644 file2
[email protected]:~/$ cd code
[email protected]:~/code$ git checkout -b chris_test_branch
[email protected]:~/code$ nano file1 // edit
[email protected]:~/code$ nano file2 // edit
[email protected]:~/code$ git status
# On branch chris_test_branch
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# file1
# file2
nothing added to commit but untracked files present (use "git add" to track)
[email protected]:~/code$ git add file1
[email protected]:~/code$ git add file2
[email protected]:~/code$ git status
# On branch chris_test_branch
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: file1
# new file: file2
#
[email protected]:~/code$ nano file1 // make a further edit, file must be re-added to this commit
[email protected]:~/code$ git status
# On branch chris_test_branch
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: file1
# new file: file2
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: file1
#
[email protected]:~/code$ git add file1
[email protected]:~/code$ git status
# On branch chris_test_branch
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: file1
# new file: file2
#
[email protected]:~/code$ git commit
[chris_test_branch e946a4e] New files added to project
2 files changed, 66 insertions(+), 0 deletions(-)
create mode 100644 file1
create mode 100644 file2