0% found this document useful (0 votes)
17 views

Git For Window

The document provides steps to configure Git and set up SSH keys to integrate Git with a GitHub account. It outlines generating an SSH key, adding the key to the GitHub account settings, and verifying the integration. It then describes commands to initialize a local Git repository, clone a remote repository, check the status of changes, stage and commit changes, view commit logs, and push changes to a remote repository on GitHub.

Uploaded by

abhipatel876t
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Git For Window

The document provides steps to configure Git and set up SSH keys to integrate Git with a GitHub account. It outlines generating an SSH key, adding the key to the GitHub account settings, and verifying the integration. It then describes commands to initialize a local Git repository, clone a remote repository, check the status of changes, stage and commit changes, view commit logs, and push changes to a remote repository on GitHub.

Uploaded by

abhipatel876t
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

06 February 2024 11:30

Step 1 : Open Git Bash and Configure Git :

git config --global user.name "Your Name"


git config --global user.email "Your email"
git config --global --list

Step 2 : Generate a SSH Key :

ssh-keygen -t rsa -b 4096 -C [email protected]


cat ~/.ssh/id_rsa.pub
Copy the output of your key.

Step 3 : Add SSH Key to Github Account :


1. Log in to your Github Account.
2. Click on your Profile Picture and Select "Settings".
3. In the left sidebar, click on "SSH and GPG Key".
4. Click "SSh Key".
5. Enter a tilte for SSh Key and paste the key on "Key field".
6. Click "Add SSh key".

Step 4 : Verify using Git and Github Integration:

ssh -T [email protected]
Step 5 : Add and Upload files to Github or Clone a Repository
in our local computer.

1. git init
Initilize a new git repository in the current directory.

2. git clone <repository Url>


Create a copy of a remote repository on our local machine.

3. git status
Show the status of changes as untracked, modified files.

4. git add <file name> or .


Add changes in a file to the staging area and preparing for
commit.

5. git commit -m "commit message"


Commit staged changes with a message.

6. git log
Displays a log of commits, showing commit message,
authors and timestamps.

7. git remote add origin <repository url>

8. git push -u origin master

You might also like