Set up Git #564
hydrolet
announced in
Intro & Outro
Set up Git
#564
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Why this task matters
Git is the version control tool that connects your local project folder to the shared repository on GitHub. It lets you clone the project, save your work, and sync changes with your team. This guide is focused solely on how to install and set up Git.
Note
If you are interested in a more thorough introduction to basic Git and Git collaboration check out the "Core: Git On-Ramp" course. You can access this course by signing up on the Endless Platform and using this access code: PreviewGITOR to join the Git program.
Steps (Windows)
Go to https://git-scm.com and download the Windows installer.
main(instead ofmaster).cd directory-namegit --versiongit version 2.42.0In Terminal, type:
git config --global user.name "Your Name"Press Return/Enter.
Then type:
git config --global user.email "[email protected]"Press Return/Enter.
This info gets attached to your commits so your team knows who made which changes.
Lastly, type this command so Git remembers your GitHub login and you’re not asked every time you send changes to GitHub.
✅ Done! Git is installed, configured, and ready to connect to GitHub.
Video
Steps (macOS)
Make sure you’re an Admin
Install Homebrew (this also installs Git)
Install Git LFS
Git LFS initialized.Install Git Credential Manager
Check that Git is working
git version 2.xx.xTell Git who you are (be sure to use the email associated with your GitHub account)
In Terminal, type:
git config --global user.name "Your Name"Press Return/Enter.
Then type:
git config --global user.email "[email protected]"Press Return/Enter.
This info gets attached to your commits so your team knows who made which changes.
The first time you try to send your changes up to GitHub, a window will pop up.
Click “Sign in with your browser.”
Log into GitHub. When it says “Authentication Succeeded,” you’re done.
Steps (Linux)
All Linux distributions are different, so here we just outline the general steps required.
You can choose to use Homebrew to install all the necessary components on any Linux distribution. Follow the macOS steps above, starting at step 2.
Otherwise, if you want to install using your distribution's package manager, read on!
Note
If you are using an immutable Linux distribution such as Endless OS, Fedora Silverblue, Bazzite, etc., you can either use Homebrew, as above, or use toolbx and follow the steps below inside a toolbx.
1. Check if Git is already installed
Many Linux distributions pre-install Git. Open a Terminal window and run:
2. Install Git
Most Linux distributions have a
gitpackage. Install it using your distribution's package manager, such asaptordnf. For example:3. Install Git LFS
Most Linux distributions have a
git-lfspackage, too. Install it using your distribution's package manager. For example:If your distribution does not have a
git-lfspackage, follow these instructions.4. Tell Git who you are
Note
Be sure to use the email associated with your GitHub account!
In Terminal, type:
git config --global user.name "Your Name"Press Return/Enter. Then type:
git config --global user.email "[email protected]"5. Install Git Credential Manager
Note
If you prefer, you can use an SSH key to connect to GitHub, and skip steps 5 and 6.
Press Return/Enter.
6. Log in to GitHub
The first time you try to send your changes up to GitHub, a window will pop up. Click “Sign in with your browser.” Log into GitHub. When it says “Authentication Succeeded,” you’re done.
✅ Done! Git is installed, configured, and ready to connect to GitHub.
Beta Was this translation helpful? Give feedback.
All reactions