- Project Status
- About the Project
- Project Description
- Chapter 1: Basic Useful Commands
- Usage
- Contributors
- Contributing
- Roadmap
- To Do
- Contacts
- License
Project Status: Under Development
This project have a propose to introduce the reader to basic concepts and commands in Git.
This is a simple basic tutorial about Git and your basic commands. Remenber, this project is under development.
- Make a "git bash here" in the main folder of the project
- Verify if your user is list in this terminal:
git config --list
- If you don't have a user in your git terminal, make this command:
git config --global user.name "Your name"
git config --global user.email "name@gmail.com"
- Now, to transfer your files to your repo in GitHub, make the commands:
git init
git status
git add .
git status
git commit -m "Project Created"
git remote add origin https://github.com/vitorstabile/git-basics.git
- If your git is in (master) try this command:
git push -u origin master
- To change to the new format, make this command to change the origin (master) to (main):
git branch -M main
- Now, push your project to GitHub:
git push -u origin main
- After you change anything in your project, make a git status:
git status
-
The red files is the files that is not sincronizer with your github
-
Add the files to stage
git add .
- Now, the files in green is in the stage
git status
- Now, make a commit:
git commit -m "another commit"
git push
- If your origin is in (main) not master, use the command below:
git push origin main
-
Make a "git bash here" in the main folder of the project
-
Verify if your user is list in this terminal:
git config --list
- If you don't have a user in your git terminal, make this command:
git config --global user.name "Your name"
git config --global user.email "name@gmail.com"
-
Now, copy the adress of the project " Ex: https://github.com/vitorstabile/git-basics.git"
-
Make this command with the copied adress:
git clone https://github.com/vitorstabile/git-basics.git
- Now, change the folder to master
cd git-basics
- To show all commits:
git log --oneline
-
Open Git Bash.
-
Paste the text below, replacing the email used in the example with your GitHub email address.
ssh-keygen -t ed25519 -C "your_email@example.com"
This creates a new SSH key, using the provided email as a label.
When you're prompted to "Enter a file in which to save the key", you can press Enter to accept the default file location. Please note that if you created SSH keys previously, ssh-keygen may ask you to rewrite another key, in which case we recommend creating a custom-named SSH key. To do so, type the default file location and replace id_ALGORITHM with your custom key name.
Enter a file in which to save the key (/c/Users/YOU/.ssh/id_ALGORITHM):[Press enter]
- At the prompt, type a secure passphrase.
> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again]
- To pring the correct way your SSH Key, make the command in Windows Machine
ssh-agent sh -c 'ssh-add; ssh-add -L'
in Linux Machine
cat ~/.ssh/id_rsa.pub
This will print something like this
ssh-ed25519 BBB3Hfncklediiwwjdfker your_email@example.com
- Copy the generated key and go in Setting than in SSH and GPG Keys
- Add your SSH Key
Using this like a bibliography if you want to remember any command with Git. For more commands, use this Notes.
![]() Vitor Garcia |
---|
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
See the for a list of proposed features (and known issues).
If so, list tasks / features that still need to be implemented in your application
📝 To Do 1
- Implement the basics concepts of Git.
Vitor Garcia |
---|