0% found this document useful (0 votes)
4 views1 page

Git Commands Basic

This document outlines basic Git commands for setting up a repository and uploading a project to GitHub. It includes steps for configuring user information, generating an SSH key, initializing a Git repository, staging and committing files, and pushing changes to a remote repository. Additionally, it provides commands for managing branches and viewing Git configuration settings.

Uploaded by

ethicalishu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Git Commands Basic

This document outlines basic Git commands for setting up a repository and uploading a project to GitHub. It includes steps for configuring user information, generating an SSH key, initializing a Git repository, staging and committing files, and pushing changes to a remote repository. Additionally, it provides commands for managing branches and viewing Git configuration settings.

Uploaded by

ethicalishu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Git Setup and Project Upload - Basic Commands

1. git config --global user.name "Your Name" # Set author name


2. git config --global user.email "[email protected]" # Set author email
3. ssh-keygen -t ed25519 -C "[email protected]" # Generate SSH key
4. cat ~/.ssh/id_ed25519.pub # Show public SSH key
5. git init # Initialize Git in folder
6. git add . # Stage all files
7. git commit -m "Initial commit" # Commit with message
8. git remote add origin [email protected]:username/repo.git # Link to GitHub
9. git branch -M main # Set main branch
10. git push -u origin main # Push code to GitHub
11. git add -u # Stage file deletions
12. git commit -m "Remove extra files" # Commit deleted files
13. git push # Push latest commit
14. git config --list # Show Git config settings
15. ls ~/.ssh # List SSH files

You might also like