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

Git PDF

The document outlines 11 steps for using git to push a local repository to GitHub, including initializing and committing changes locally, adding a remote repository on GitHub, and pushing the local master branch to GitHub. It also covers creating and checking out a new branch locally before pushing code.

Uploaded by

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

Git PDF

The document outlines 11 steps for using git to push a local repository to GitHub, including initializing and committing changes locally, adding a remote repository on GitHub, and pushing the local master branch to GitHub. It also covers creating and checking out a new branch locally before pushing code.

Uploaded by

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

Step 1 - Initiate git –

git init

Step 2 - knowing status –

git status

Step 3 – adding all the new files – (adding dot after space in necessary)

git add .

Step 4 - committing –

git commit -m "message- here what I did this time"

Step 5 - Go to GitHub-

create new repository

Step 6 - copy the address for repo

e.g. [email protected]:abcd123/git_alex.git

Step 7 - again @git bash

Step 8 - adding remote repo –

git remote add origin paste repo address

Step 9 - pushing local folder at github repo –

git push -u master origin

Step 10 - this creates master(main) branch

Step 11 - Creating New branch

git branch new-branch

Step 12 – Switching from the master to new branch

Git checkout new-branch

You might also like