$ git gud
> git: 'gud' is not a git command. See 'git --help'.
Here's why you should learn Git:
* Basics are pretty easy!
* (Almost) every developer team & job requires it
* Stop worrying about breaking your code
* because you can always revert back
#100DaysOfCode #Git

> git: 'gud' is not a git command. See 'git --help'.
Here's why you should learn Git:
* Basics are pretty easy!
* (Almost) every developer team & job requires it
* Stop worrying about breaking your code
* because you can always revert back

#100DaysOfCode #Git


How to get started in a few tweets:
1. Download git https://git-scm.com/downloads
2. Use a terminal and navigate to your project
3. Run "git init"
4. Create a GitHub account https://github.com/join
1. Download git https://git-scm.com/downloads
2. Use a terminal and navigate to your project
3. Run "git init"
4. Create a GitHub account https://github.com/join
5. Create a repo
http://repo.new
6. git config --global http://user.name 'your name'
7. git config --global http://user.email '[email protected]'
8. Follow the steps GitHub tells you (see image)

6. git config --global http://user.name 'your name'
7. git config --global http://user.email '[email protected]'
8. Follow the steps GitHub tells you (see image)
These commands are what you will use the most and are all you need to get started
1. git init (initialize repository)
2. git add <file> (add a file to index)
3. git status
4. git commit ("save" changes)
5. git push (push changes to GitHub)
6. git pull (download changes)
1. git init (initialize repository)
2. git add <file> (add a file to index)
3. git status
4. git commit ("save" changes)
5. git push (push changes to GitHub)
6. git pull (download changes)
One that I use all the time is
git add .
If I want to add all the files in the current directory / folder so I can commit them
Some additional ones:
* git branch my-branch name (create a new branch)
* git checkout my-new-branch (change to a branch)
More info on these below
git add .
If I want to add all the files in the current directory / folder so I can commit them
Some additional ones:
* git branch my-branch name (create a new branch)
* git checkout my-new-branch (change to a branch)
More info on these below

Create a .gitignore file in the root of your project (note the . )
Then add the files or directories to that file like:
my_secret_directory/
favorite_developers.txt
*.zip
and it will ignore those files after you commit the gitignore
Branches allow you to work on a feature in isolation until it is finished
Run "git branch" and it will say you are on the "master" branch (default)
git branch my-new-feature
git checkout my-new-feature
Start committing/pushing for your new feature
See image (1 dot = 1 commit)
Run "git branch" and it will say you are on the "master" branch (default)
git branch my-new-feature
git checkout my-new-feature
Start committing/pushing for your new feature
See image (1 dot = 1 commit)
To "copy" those changes back into the master branch you can do:
git checkout master
git merge my-new-feature
git push
Here is an article on a branching strategy you could use, but it's not required. You can do whatever you want.
https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows
git checkout master
git merge my-new-feature
git push
Here is an article on a branching strategy you could use, but it's not required. You can do whatever you want.
https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows
Want a more detailed explanation? @traversymedia has a great video on this topic!
I even referenced it for this thread so I was sure I didn't forget something

I even referenced it for this thread so I was sure I didn't forget something



Additional topics you could read about later:
- Git is not the same as GitHub
- git stashing
- pull requests on GitHub
- code reviews on GitHub
- Forking on GitHub
- Using SSH with Git
Need help? Run "git --help" but Google is also your friend! We are developers after all
- Git is not the same as GitHub
- git stashing
- pull requests on GitHub
- code reviews on GitHub
- Forking on GitHub
- Using SSH with Git
Need help? Run "git --help" but Google is also your friend! We are developers after all

</thread>
This is the end of the thread
This is the end of the thread