Git Video Tutorial 2

Git Video Tutorial 2In this part of my Git video tutorial I’ll cover using GitHub and remote repositories in general. We’ll push and pull data from GitHub and to GitHub. We’ll also take a look at remote, fetch, tagging, aliases, clone and much more.

If you missed part 1 of my Git video tutorial you need to watch that first because I covered a lot there. I also have a transcript of the video below.

If you like videos like this it helps to tell Google Plus with a click here

Other Git Video Tutorial Videos

Init, Add, Commit, Status, Diff, Rm, Log and Installation :

GitHub, Remote Repositories, Push, Pull, Remote, Fetch, Tagging, Aliases and Clone :

Branching, HEAD, Checkout, Rebasing, Reverting, Reset, Clean, Solving Merge Conflicts and Mergetool :

Generating SSH keys, how to set up multiple GitHub accounts on one computer and the Fork & Pull workflow :

---------------- GIT PART 2 ---------------- 

1. GitHub allows you to host your code repositories online. I'll set up everything for it in this video. I'll also cover remote depositories in general.

2. Remote repositories are normally read only, or read write only to those who are authorized 

3. You either push or pull updates from these remote repositories.

4. To push your directory to GitHub ---------------- 

a. git init

b. git add . # Stages all new and modified files and directories

c. git commit -m 'Initial Project Version'

d. git remote add origin

e. git push origin master

5. git remote -v # Lists all remotes and their URLs

6. git fetch origin # Gets data from the remote, but it doesn't merge changes with your work

7. git pull

a. Pulls all changes and saves them to your directory

8. How to push changes to GitHub ---------------- 

a. I add .gitignore for Android on my local machine

b. In the terminal type

I. git add .gitignore # Stage .gitignore

II. git commit -m 'Added .gitignore for Android' # Commit

III. git push # Push the changes to GitHub

9. git remote rename origin sf # Renames remote to sf

10. Tagging ---------------- 

a. Tags are used to tag files at important points in history

b. git tag -a v0.1 -m 'version 0.1' # Creates an annotated tag

c. git tag # Shows all the tags

d. git show v0.1 # Shows details about the commit that was tagged

e. git tag v0.4-lw 

I. Creates a lightweight tag on a commit that stores the hash for the commit

f. git tag -a v0.01 c930a8

I. You can tag commits after the event also. When you enter this command an editor opens for you to leave a comment. The final part is the hash for the commit you want to tag.

g. git push sf v0.1 # You can also push tags

I. The tag shows up under releases on GitHub

II. git push sf --tags # You can also push all tags at once

h. You can set aliases to save time

I. git config --global commit

II. Now you can type git co to commit

i. Clone a GitHub Repository

I. Go to the directory you want to use

II. git clone

4 Responses to “Git Video Tutorial 2”

  1. Laurence Quinn says:

    Hey Derek,
    I really like the Git videos. Thanks.
    Random question but what font do you use in Eclipse? I really like it and would like to use it on my Eclipse.
    I sent this here because I guess you’re most likely to see it here!

    Thanks a lot!

  2. George Torres says:

    Sr. Derek, seu trabalho é grandioso. I’ll share here in Brazil.

Leave a Reply

Your email address will not be published.