
$ git clone git@github.com:intentmedia/code.git
Initialized empty Git repository in /home/pj/Code/IM/data/.git/
remote: Counting objects: 738, done.
remote: Compressing objects: 100% (396/396), done.
remote: Total 738 (delta 336), reused 680 (delta 279)
Receiving objects: 100% (738/738), 177.44 KiB, done.
Resolving deltas: 100% (336/336), done.
$

$ echo 'Adding this to the README' >> README
$ git add README
$ git commit --message 'This is an example of a commit'
$ git push
Counting objects: 5, done.
Delta compression using up to 6 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 313 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
To git@github.com:pgroudas/git_preso.git
23cc04d..e076226 gh-pages -> gh-pages



$ git pull --rebase
First, rewinding head to replay your work on top of it...
Fast-forwarded master to db46daeff68ab4d58283cc5f504baceb7193a4fa.

Update code frequently with ⌘+t and select Rebase update type
Commit with ⌘+k and you generally want to push at the same time
Most common problems occur while pulling down upstream changes

Just like any version control system, if multiple users are editing the same files, occasionally you have to resolve conflicts. Intellij is actually pretty sane about dealing with conflicts and prompts you to resolve them when you update.


git rebase --abort at the command linepj@onslaught:~/Code/IM/code$ git pull --rebase First, rewinding head to replay your work on top of it... Applying: PJ: This is a test commit Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging adServer/config/production.properties CONFLICT (content): Merge conflict in adServer/config/production.properties Failed to merge in the changes. Patch failed at 0001 PJ: This is a test commitWhen you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort".
Merge tool is accessible via Version Control > Git > Merge Tool
“With great power comes great responsibility.” -Stan Lee
Seriously, you should probably skim the git community book if you want to use the more advanced features.
master branch remains pristine locally.mastergit branch <branchname>git checkout <branchname>git checkout -b <branchname>git rebase master <branchname>git checkout master; git merge --ff-only <branchname>You may occasionally accumulate a small number of commits locally before you share them. Interactive rebasing allows you the oppurtunity to clean up the commits in a number of ways before you push them up stream.


git help command in terminal