git initSage M. Abdullah
introoutlinehave you ever used...have you ever used...

ctrl+zversion control systemversion control systemManages changes to collections of information.
version control systemManages changes to collections of information.
version control systemManages changes to collections of information.
version control system
medium.com/faun/centralized-vs-distributed-version-control-systems-a135091299f0
medium.com/faun/centralized-vs-distributed-version-control-systems-a135091299f0
git
git
git initgit init.git directory
git statusgit status
let's add something!let's add something!
git addgit addgit add file1 file2 ...
git commitgit commitgit commit -m "Your commit message here"git commitgit config user.name "Your Name"git config user.email "[email protected]"--global flag to make it the default.git commitWhy is that needed?
Git uses SHA1 hash to refer to commits. It's generated based on:
gist.github.com/masak/2415865
auth0.com/blog/hashing-passwords-one-way-road-to-security/
workflow in git
try repeating it!git add file1 file2 ...git add .git commit -m "Update something"git loggit log
how git stores commitbut it can be more complex than that...
how git stores commit
stackoverflow.com/a/24107223stackoverflow.com/a/9074343
how git stores commit
git branchThings get more interesting with branches.
However, before that...
So far, we’ve only worked with git repositories locally.
if you're collaborating......how do you share your code?



if you're collaborating......how do you share your code?


let's push our repo!
let's push our repo!
git remote && git pushgit remote && git pushgit remote add origin https://git{hub,lab}.com/...git push -u origin masterRemote name is usually origin.
Default branch is master.
voila!
git clonegit clonegit clone https://git{hub,lab}.com/...git pullgit pullgit pull origin masteropen source projectsopen source projects
The source code of an open source software should be released under a license in which the copyright holder grants users the rights to study, change, and distribute the software to anyone and for any purpose.
open source projectsopen source projects
contributing to open sourcecontributing to open sourcecontributing to open sourcecontributing to open source
contributing to open source
contributing to open source
contributing to open sourcecontributing to open source
{
"name": "Sage M. Abdullah",
"slides": {
"hosted": "https://slides.laymonage.com/git-init",
"source": "https://github.com/laymonage/slides-git-init"
"license": "https://creativecommons.org/licenses/by/4.0"
}
}