Git Github Github Basics
Git Github Github Basics
Basics
What Is Github?
Github is a hosting platform for git repositories. You
can put your own Git repos on Github and access
them from anywhere and share them with people
around the world.
987fac... d8194d6
987fac... d8194d6
171615... 171615...
987fac... d8194d6 171615...
987fac... d8194d6
987fac... d8194d6
171615... 171615...
987fac... d8194d6
987fac... d8194d6
171615... 171615...
987fac... d8194d6
987fac... d8194d6
171615... 171615...
I GOT A
NEW LAPTOP!
Now I need my code
987fac... d8194d6
987fac... d8194d6
171615... 171615...
987fac... d8194d6
987fac... d8194d6
171615... 171615...
987fac... d8194d6
987fac... d8194d6
171615... 171615...
Github is not your
only option...
There are tons of competing tools that provide
similar hosting and collaboration features,
including GitLab, BitBucket, and Gerrit.
Git will retrieve all the files associated with the ❯ git clone <url>
repository and will copy them to your local machine.
THIS MACHINE
DOES NOT HAVE
THE REPO YET!
❯ git clone https://github.com/blah
987fac... d8194d6
987fac... d8194d6
171615... 171615...
987fac... d8194d6
987fac... d8194d6
171615... 171615...
newfeature
Github Repo master
newfeature
Github Repo master
newfeature
Github Repo master
newfeature
newfeature
Github Repo master
newfeature
❯ git push origin master
My Local Repo master
newfeature
Workflow Recap
Remember to follow these basic steps:
Create a new empty repo on Github
Copy the repo URL ❯ git remote -v
Add a remote to your local repo, using the URL
Push your changes up to the remote
git add git commit
git push
git fetch
git pull