8. LOLWATTZDIS?
• With Github, you can…
– Find/Clone/Help someone else’s nice projects.
– Sync your progress across multiple machines.
– Roll back your project to previous state.
– Publish/Share your project.
• “Git” is one of many Version Control Systems (VCS).
• Github is one of public platforms (hubs) of Git.
Introduction to Github 8
9. LOLWATSDIS?
• With Github, you can…
– Find/Clone/Help someone else’s nice projects.
– Sync your progress across multiple machines.
– Roll back your project to previous state.
– Publish/Share your project.
• “Git” is one of many Version Control Systems (VCS).
• Github is one of public platforms (hubs) of Git.
Introduction to Github 9
• Seems nice, but what is ‘cloning’?
Cloning a project is basically copying it to
your machine/environment to extend it
as you like.
You can clone any public projects
including very famous one such as jQuery
(/jQuery/jQuery)
• How to help someone?
Clone their project, modify, and offer
your help as ‘pull request’ (covered later)
10. LOLWATSDIS?
• With Github, you can…
– Find/Clone/Help someone else’s nice projects.
– Sync your progress across multiple machines.
– Roll back your project to previous state.
– Publish/Share your project.
• “Git” is one of many Version Control Systems (VCS).
• Github is one of public platforms (hubs) of Git.
Introduction to Github 10
• Thanks a bunch! But how?
Covered later in detail; in a few words:
1. Uploading your progress to Github
2. Downloading it to other machines
3. (Conflict shall be checked/marked)
• Is it automatic?
NO. Why? Covered later.
11. LOLWATSDIS?
• With Github, you can…
– Find/Clone/Help someone else’s nice projects.
– Sync your progress across multiple machines.
– Roll back your project to previous state.
– Publish/Share your project.
• “Git” is one of many Version Control Systems (VCS).
• Github is one of public platforms (hubs) of Git.
Introduction to Github 11
• Why this is important?
When you mess up with your project and
it stops working (happens often), you can
come back to the point it had worked.
• To any states before? Any limit?
No limitation. Github doesn’t have “max
space.” You’ll see why.
12. LOLWATSDIS?
• With Github, you can…
– Find/Clone/Help someone else’s nice projects.
– Sync your progress across multiple machines.
– Roll back your project to previous state.
– Publish/Share your project.
• “Git” is one of many Version Control Systems (VCS).
• Github is one of public platforms (hubs) of Git.
Introduction to Github 12
• Could be useful… but can I keep it private?
NO. This is why github is free AND space-
unlimited. Projects uploaded on github is
considered public assets(or Open Source
Software) thus forcibly published.
• Really?
…Unless you pay at least $7/month.
13. Now you know Github is
• Platform of distributed development for
Open Source Software using Git
– Actually, not limited to software. Any contents can
be managed on github (images, .doc, .xls, etc.)
– You must acknowledge contents on Github is
published, thus you shouldn’t upload restricted
contents (such as data including private info.)
– Let’s delve into “How”
Introduction to Github 13
14. From Where?
• Basic Git is CUI thing
– You may learn/use Git this way, and actually, sometimes, for
some kind of people, it’s even easier. But for now…
• Let’s do this from Eclipse GUI (for Java users)
Introduction to Github 14
15. Requirement
• Any working Eclipse (not too old one)
• ssh-keygen
– Included in recent versions of Eclipse
– Other ways:
• On Mac/Linux this is innately installed
• On Windows:
– If you have cygwin installed, you’re OK.
– If you have PuTTY or TeraTerm installed, you’re OK.
– Otherwise, install TeraTerm.
» PuTTY and TeraTerm are both terminal emulator. For
OpenSSH keygen purpose, TeraTerm is simpler and easier.
Introduction to Github 15
16. EGit
• … is Eclipse plugin for Git.
• Install it.
1. Launch Eclipse
2. Help > Eclipse Marketplace
3. Search “EGit”
4. Install
Introduction to Github 16
17. Prepare SSH public key
• Stay in Eclipse
• Open “設定”(Preferences)
– “一般”(General)>”ネットワーク接続”(Network
Connection)>”SSH2”
– “鍵管理”(Key Management)
– “RSA鍵の生成”(Generate RSA Key)
– “秘密鍵の保管”(Save Private Key)
• Default name would be “id_rsa”
• Path should be <user>/.ssh/
Introduction to Github 17
18. Prepare SSH public key
• If you already got one, new key isn’t required
– Found “<user>/.ssh/id_rsa.pub” ? => Done.
• On Mac/Linux or Cygwin:
– Launch Terminal or Cygwin
– Type “ssh-keygen”
• Save/Move your key under <user>/.ssh/
• On TeraTerm:
– Cancel “新しい接続”
– “設定” > “SSH鍵生成”
• Save under <user>/.ssh/
Introduction to Github 18
19. Prepare SSH public key
• On PuTTY:
– Find PuTTYGen in PuTTY install directory
– “生成”(Generate)
– (Move cursor around)
– “変換”(Convert)
>“OpenSSH形式”
• This is for private key
– Save as appropriate name
• Default: <user>/.ssh/id_rsa
• No extension needed
Introduction to Github 19
20. Prepare SSH public key
– Copy this
• PuTTYGen generate original format ssh key
• OpenSSH format key required
• This is for pubic key
– Open text editor
– Paste
– Save as appropriate name
• Default: “id_rsa.pub”
Introduction to Github 20
29. Specify SSH private key for Eclipse
• Generated your key via Eclipse? => Done.
• If not:
– Your key is <user>/.ssh/id_rsa? => Done.
– If not:
• Open “設定”
• “一般”>”ネットワーク接続”>”SSH2”
• “秘密鍵の追加”(Add Private Key)
• Specify your key name
– Make sure it’s stored under <user>/.ssh/
Introduction to Github 29
31. Create Repository
• What’s “repository”?
– Storage for Git objects
– There must be remote repository on Github AND
local repository on your machine
– Concept: Transactions are done between
repositories (specific locations)
Introduction to Github 31
39. Create Local Repository
• Where to reposit?
– Recommended: Distinct, new path dedicated only for
that repository outside of Eclipse workspace
• Not the same as the already existing project directory
(usually in Eclipse workspace)
• Why? -> Several reasons. Primarily for future use when you
would want to place multiple projects in that repo.
• Faster (Git only cares about files inside the repo)
– Easier to understand: Project directory
• No need to move files (easier to initialize)
• Sometimes slower (Git starts to check files in workspace)
Introduction to Github 39
40. Create Local Repository
• Where to reposit?
– Recommended: Distinct, new path dedicated only for
that repository outside of Eclipse workspace
• Not the same as the already existing project directory
(usually in Eclipse workspace)
• Why? -> Several reasons. Primarily for future use when you
would want to place multiple projects in that repo.
• Faster (Git only cares about files inside the repo)
– Easier to understand/start: Project directory
• No need to move files (easier to initialize)
• Sometimes slower (Git starts to check files in workspace)
Introduction to Github 40
…If you are certain about 1 project <-> 1 repo philosophy
Go to
45. Create Local Repository
• If you are to place your repo outside of Eclipse
workspace…
Introduction to Github 45
46. Create Local Repository
• If you are to place your repo outside of Eclipse
workspace…
Introduction to Github 46
Default path would be /<user>/git/
After proceeding, project migration to new
path will begin.
48. Introduction to Github 48
Repository Ready
Open Git repositories pane.
ウィンドウ>ビューの表示>その他>チーム
Indicators appeared
(‘>’,’?’,’[NO-HEAD]’,…)
49. A little backtracking
• It’s good time to learn how exactly Git works.
Introduction to Github 49
50. A little backtracking
• It’s good time to learn how exactly Git works.
Introduction to Github 50
GithubYour Machine
Your Eclipse
51. A little backtracking
• You’ve created repositories.
Introduction to Github 51
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
52. A little backtracking
• Obviously, you want to store your project.
• …but making repository is just
a first step.
Introduction to Github 52
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
53. A little backtracking
• Inside repos are indexes (file lists)
• Indexes track what files belong
to the repos
Introduction to Github 53
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-…
-…
-…
Index
-…
-…
-…
54. A little backtracking
• Inside repos are indexes (file lists)
• Indexes track what files belong
to the repos
• You can ‘git add’ to the index
Introduction to Github 54
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
‘git add’!!
Added!
55. A little backtracking
• Now the local repo knows your files
• But only their existence.
• Repo must know if files are
ready to be shared/launched
Introduction to Github 55
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
56. A little backtracking
• Your next move is to register your progress
•
•
Introduction to Github 56
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
57. A little backtracking
• Your next move is to register your progress.
• ‘git commit’ is the way to go.
• Records your current progress
on indexed files to the repo.
Introduction to Github 57
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
‘git commit’!!
58. A little backtracking
• You commit to a specific “branch”
• Branch = Front-ends of devel.
flows (latest commits)
First commit creates ‘master’
Introduction to Github 58
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
c00
master
Created!
59. A little backtracking
• If you modify your files and commit again,
•
Introduction to Github 59
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
‘git commit’!!
master
c00
60. A little backtracking
• If you modify your files and commit again,
• …that records are committed
to currently targeted branch
(in this case ‘master’).
New one becomes branch.
Introduction to Github 60
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
master
c00 c01
61. A little backtracking
• You can make another branch
•
Introduction to Github 61
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
master
c00 c01 c02 c03
another
62. A little backtracking
• You can make another branch
• Committing to another branch
will separate the flow.
Introduction to Github 62
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
master
c00 c01 c02 c03
a01a00
another
63. A little backtracking
• You can make another branch
• Committing to another branch
will separate the flow.
• Also you can merge them.
Introduction to Github 63
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
master
c00 c01 c02 c03
a01a00
m00
64. A little backtracking
• If branches conflict (like edited same file),
•
Introduction to Github 64
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
master
c00 c01 c02 c03
a01a00
another
65. A little backtracking
• If branches conflict (like edited same file),
• …Git notifies conflicting files.
Introduction to Github 65
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
master
c00 c01 c02 c03
a01a00
another
66. A little backtracking
• If branches conflict (like edited same file),
• …Git notifies conflicting files.
• Then you must manually fix
conflicts then add again.
Introduction to Github 66
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
master
c00 c01 c02 c03
a01a00
another
Fix & ‘git add’!!
67. A little backtracking
• If branches conflict (like edited same file),
• …Git notifies conflicting files.
• Then you must manually fix
conflicts then add again.
Introduction to Github 67
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
master
c00 c01 c02 c03
a01a00
m00
68. A little backtracking
• Anyway, let’s go committing for now!
• Back to Eclipse…
Introduction to Github 68
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
c00
master
Created!
70. Introduction to Github 70
Add/Commit
These indicator means:
> -Uncommitted changes exists
? -Not added to the index
* -Added but uncommitted (‘staged’)
[<branch name>] -Current branch**
**Pointer/cursor to current branch is called
‘HEAD’. ‘NO-HEAD’ means no branch specified.
Indicators appeared
(‘>’,’?’,’[NO-HEAD]’,…)
71. Introduction to Github 71
Add/Commit
• Right click on the project,
• “チーム”(Team),
• You’ll find its contents changed
• “コミット”(Commit)
• (You can do the same thing by right-clicking
the repository from the repositories pane.)
72. Introduction to Github 72
Add/Commit
• (This window can differ from an Eclipse
version to another, this is Juno 4.2.2)
• Commit Message is important feature used
for explaining what changes are made.
• Keep it simple but understandable
• If there are untracked files, you can add
them here. (Check this “Show untracked”)
Hit “Commit” if messages/adding
files are ready
73. Add/Commit
• Gratz! Your first LOCAL commit
(+ add) is made.
• You notice the ‘>’ indicator
disappeared from the project.
– This means the local repository
now stored your progress.
Introduction to Github 73
74. “Remote Control”
• Next step is to interact with the remote repo.
•
Introduction to Github 74
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
c00
master
Created!
75. “Remote Control”
• Next step is to interact with the remote repo.
• Remote contents are managed
with similar branch system.
• On repo creation, remote
‘master’ was also made.
Introduction to Github 75
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
c00
master
r00
master
76. “Remote Control”
• Now, you need special local branch.
•
Introduction to Github 76
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-… r00
masterc00
master
77. “Remote Control”
• Now, you need special local branch.
• So-called “remote tracking”
• This branch tracks/syncs with
status of remote branch.
Introduction to Github 77
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-… r00
master
r00
origin/master
c00
master
78. “Remote Control”
• ‘origin’ means it’s your primary remote repo.
• ‘origin/master’ means it syncs
with ‘master’ branch on your
remote repo.
Introduction to Github 78
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-… r00
master
r00
origin/master
*These are just a common tactics to
name a remote tracker. You may
name yours as you want.
c00
master
79. “Remote Control”
• Tracker will ‘git fetch’ the remote contents.
• The first fetch creates the
remote tracker.
Introduction to Github 79
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-… r00
master
r00
origin/master
Created!
‘git fetch’!!
c00
master
80. “Remote Control”
• Then you merge 2 local branches.
•
Introduction to Github 80
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
c00
master
r00
master
r00
origin/master
81. “Remote Control”
• Then you merge 2 local branches.
• Now local ‘master’ contains all
contents from local & remote.
Introduction to Github 81
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
c00
master
r00
master
r00
origin/master
m00
*In distributed developments, conflicts can happen on this phase.
**If you followed this instruction, local ‘master’ contains your local
project and initially created README from remote at this moment.
82. “Remote Control”
• With fetch & merge, local branch is up-to-date
• Normally you do this before
starting your work of the day.
• You may just ‘git pull’ here.
Introduction to Github 82
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
c00
master
r00
master
r00
origin/master
m00
*Pull basically means ‘fetch then merge’ combined.
83. “Remote Control”
• Next move obviously, is going opposite way
•
Introduction to Github 83
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
c00
master
r00
master
r00
origin/master
m00
84. “Remote Control”
• Next move obviously, is going opposite way
• At this point all tools are set.
• ‘git push’ will do the trick.
Introduction to Github 84
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
c00
master
r00
master
r00
origin/master
m00
*Push will commit to the remote tracker, then sync it to the
branch on the remote by uploading/overwriting contents.
**Again, conflicts can happen here, and your push sometimes
‘rejected’ by the remote. If so, you need to fetch & merge.
r01
‘git push’!!
r01
85. “Remote Control”
• So, in summary:
• Pull (fetch & merge). Remote
tracker created. (Do work.)
Push. Done. Let’s do this ->
Introduction to Github 85
Github
Your Eclipse
Remote RepositoryLocal Repository
Your Machine
Index
-File1
-File2
-…
Index
-…
-…
-…
c00
master
r00
master
r00
origin/master
m00
r01
r01
87. Remote Configuration
Introduction to Github 87
Back to Web Browsers.
Your Remote Repo page.
Copy this address.
Make sure its ‘SSH’.
*You registered SSH key, so you can pull/push via SSH connection.
**You can pull via HTTPS, but cannot push.
94. PushConfiguration
Introduction to Github 94
Your copied address should automatically
be inserted from clipboard.
No need to modify username/password.
‘git’ is global username, auth’ed by key
97. Push Configuration
Introduction to Github 97
Complement service will automatically
search existing remote branches.
Choose ‘master’ branch.
98. Push Configuration
Introduction to Github 98
Checking this has literal meaning.
When pushing, it will ignore push
rejection from the remote branch
and forcibly push the local HEAD.
Generally a bad idea.
107. Fetch Configuration
Introduction to Github 107
Now that fetch configuration is ready,
let’s try fetching for the first time!
Remember, first fetch will create the
remote tracking branch ‘origin/master’
109. Remote Tracking Branch
• Under “ブランチ”(Branch)
>”リモート・トラッキング”(Remote tracking),
you will find ‘origin/master’
• To reflect the remote status to local…
Introduction to Github 109
110. Merge
• Right click on the remote tracker
• “マージ”(Merge)
Introduction to Github 110
111. Merge
• At this time, result should be like this.
• Key is ‘Fast-forward’(FF)
– Basically means no conflicts there.
– To be precise, one branch is wholly older, and its
recent commit is included in the other.
Introduction to Github 111
112. Merge
• Here comes README from the
remote joining the local.
• Finally, to upload this merged
commit to the remote…
Introduction to Github 112
113. Push
Introduction to Github 113
2 ways of doing this:
Right click on the project
> “チーム”(Team)
>”アップストリームへプッシュ”
(Push to upstream)
or
Right click on ‘origin’ under “リモート”
>”プッシュ”(Push)
117. Easier way for daily use
• Now the very basic git usage is covered.
• May pull / commit and push as shortcut.
Introduction to Github 117
118. Versioning
• Versioning is done through tagging in git.
• You may noticed “タグ”(Tag) in the repo pane.
• Right click and “タグの作成”(Create a tag)
Introduction to Github 118
120. Tag
Introduction to Github 120
Appropriate name (such as v1.0, v2.4-beta)
Description message
Choose a commit you want to tag
121. Tag
• Now that commits are tagged.
• If you want to publish these tags (versions),
you need to push tags manually.
– Not tied to branch pushing, but the concept is
exactly the same.
Introduction to Github 121
122. Push Tag
• Right click on the tag > “Push Tag”
• “構成済みレポジトリー”
(Configured Repository)
• Hit Next
Introduction to Github 122
123. Push Tag
• Tricky part: Tags are referred like
‘refs/tags/<tag name>’.
Introduction to Github 123
124. Push Tag
• Tricky part: Tags are referred like
‘refs/tags/<tag name>’.
• You need to manually
specify this.
Introduction to Github 124
Target name
125. Push Tag
• Tricky part: Tags are referred like
‘refs/tags/<tag name>’.
• You need to manually
specify this.
• Basically just copy the
name above.
Introduction to Github 125
Target name (refs/tags/v1.1)
126. Push Tag
• Result should be like the left
• On Github, ‘releases’ should appear and you
can see the version history
Introduction to Github 126
127. Versioning
• Versioning itself needs its own philosophy and
practice, and it’s ultimately depends on how
the team will handle the project.
• Make/follow the guideline and decide
when/how often/what kind of state to publish.
Introduction to Github 127
128. From Remote, Comes…
• So far, we assumed you have your local project
developed without using git.
• And how to integrate it with git is covered.
• Let’s see how to duplicate your git-integrated
project to your extra machines.
• Or to duplicate other’s project.
– These are done with exact same procedure.
Introduction to Github 128
129. Clone
• You can ‘git clone’ the remote repo itself.
•
Introduction to Github 129
Github
Your Eclipse
Remote Repository
Your Machine
Index
-…
-…
-… r00
master
r01
130. Clone
• You can ‘git clone’ the remote repo itself.
• And it’s really easy!
• Not only it copies contents of
the repo, it automatically set
all the remote configuration!
Introduction to Github 130
Github
Your Eclipse
Remote Repository
Your Machine
Index
-…
-…
-… r00
master
r01
Local Repository
Index
-File1
-File2
-…
c00
master
r00
origin/master
m00
r01
‘git clone’!!
Created!
Created!
Created!
Created!
131. Clone
• All you need is…
• Copy.
Introduction to Github 131
This.
132. Clone
• On your target machine,
• Right click on the blank area of the repo pane.
• “リポジトリー・パスまたはURIの貼り付け”
Introduction to Github 132
134. Clone
Introduction to Github 134
You cannot clone to
non-empty path.
If the repo includes Java project,
you can also import them.
135. Clone
• With cloning, you can duplicate your Eclipse
project env. on another machine with ease.
– As long as you respect the procedure of
pull/modify/commit/push, you can work on your
project from various places without an issue.
– But sometimes an error will happen. And in a team
development conflicts are common.
• To prevent your working branch being overwritten by a
problematic commit, there is no auto-pull.
• To prevent not-ready code being sent to the remote, there is
no auto-commit/push.
Introduction to Github 135
136. Clone/Fork
• You can clone other developer’s repository,
and modify on branches as you like.
– You may do this on Github alone, creating the
remote clone of the original in your account.
(Called forking.)
– Note: However, pushing to original repository is
only allowed to the repo’s owners.
• If you have done valuable modification to the branch of
cloned/forked repo, you can ‘pull request’ to the owner.
• Push your branch to forked repo, then submit pull
request on the original repo.
Introduction to Github 136
137. .gitignore
• Sometimes you want certain files to stay
untracked/excluded from index.
– Especially data including privacy info.
• Then you can “無視”
(ignore) such data.
– Listed on .gitignore
• After that, commit the
branch
– .gitignore will be added
Introduction to Github 137
138. Back to the Past
• So how to return to previous state?
• 1-step back (just want to discard 1 commit):
– Already pushed? > git revert. Making new commit.
• But your code may already be used by someone.
– Not pushed? > Amend commit, or reset and start over.
• Multi-step back
– Make new branch on the past commit, checkout
(means moving your current branch(HEAD)), work on
it, eventually merge with master, or discard old
master and name the current as new master.
– Branching is has high flexibility.
Introduction to Github 138
139. Other stuff
• There are many more functions in git
– Notably rebase.
• But for now, that’s it!
– For personal/laboratory use, we learned more
than enough I believe.
• Utilize my account(/YuMatsuzawa/) for testing
Introduction to Github 139
140. CUI (Git for Windows required)
• $ cd <project directory>
• $ git init #repo created
• $ git add <files to be added>
• $ git commit –a #commit all
• $ git remote add origin <remote URI>
#remote config
• $ git fetch origin #fetch any branches
• $ git merge origin/master #merge remote tracker
• $ git push origin master #push to remote
Introduction to Github 140