$ 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

🧵⬇️
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)
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)
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
🛑 Don't want some files added to git?

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)
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
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 😂

📽️🔗
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 😁
Fun fact: Git was invented in 2005 by Linus Torvalds, the same person who invented Linux!
</thread>

This is the end of the thread
You can follow @EddyVinckk.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.