Site Map - skip to main content - dyslexic font - mobile - text - print

Hobby Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.


Please support our Patrons

Our hosting is kindly provided by Josh from AnHonestHost.com. We would appreciate it if you could donate to help reduce his costs in funding the hosting. He is also accepting bitcoins to 1KsxJr9HtsdaUeU7yaV9bk9bQi21UPBtUq
Please also consider supporting the https://archive.org/donate/ who are now hosting our media files. Right now, a generous supporter will match your contributions 3-to-1. So your $5 donation results in $20 for the Internet Archive.

In-Depth Series

Introduction to Git

Initiated by Klaatu, this open series introduces Git and the concepts behind its use in a collaborative environment.

Intro to git branch - klaatu | 2018-03-26

These are all the commands covered in this episode. This is not a sequence, it's just all the commands in the episode, listed one after another.

Get changes from the remote repo:


$ git fetch

See all branches:


$ git branch --all

View a remote branch after you have fetched it:


$ git checkout origin/dev

Create a copy of a fetched remote branch in your local repo:


$ git checkout dev

Merge changes from remote origin/master into your local master branch:


$ git merge master origin/master

Fetch and merge automatically:


$ git pull

Create a new branch, and change to it:


$ git checkout -b dev

Merge dev into master:


$ git checkout master
$ git merge master dev

Merge master into dev


$ git checkout dev
$ git merge dev master

Delete the dev branch:


$ git branch -d dev

Intro to git remote - klaatu | 2018-03-20

Instantiate a git repo:


$ mkdir alice
$ cd !$
$ git init

Add a remote:


$ git remote add origin URI_OF_REMOTE

Change a remote:


$ git remote set-url origin NEW_URI

A remote can be a server, it can be a local directory, an NFS share, pretty much whatever you want.

It is a Git convention that the primary remote is called origin. You don't have to call it that, but it's pretty common.


Intro to Git with pen and paper - klaatu | 2018-03-08

git add

git commit -m "some useful message"

git push origin HEAD