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

Git Bash

The document outlines the steps to initialize a local Git repository, add files, create a GitHub repository, connect the local and remote repositories, commit changes locally, and push the changes to GitHub. It provides instructions and confirmation messages for setting global user information, initializing and adding files to the local Git repo, creating the remote repo on GitHub, connecting the local and remote repos, committing files with a message, checking differences between stages, and finally pushing the committed changes to the remote GitHub repo linked to the local master branch.

Uploaded by

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

Git Bash

The document outlines the steps to initialize a local Git repository, add files, create a GitHub repository, connect the local and remote repositories, commit changes locally, and push the changes to GitHub. It provides instructions and confirmation messages for setting global user information, initializing and adding files to the local Git repo, creating the remote repo on GitHub, connecting the local and remote repos, committing files with a message, checking differences between stages, and finally pushing the committed changes to the remote GitHub repo linked to the local master branch.

Uploaded by

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

0. login( git config --global user.email"vatsgoyal27@gmail.

com")
( git config --global user.name"vatsgoyal27")
Confirm. = Empty

1. Open the file (cd, pwd, mkdir)


Confirm. = *Using ls Command* the file names should show

2. Initialize the folder (git init)


Confirm. = Initialized empty Git repository in C:/Users/Vatsal Goyal/C26/.git/

3. Add the files (git add -A)


Confirm. = warning: LF will be replaced by CRLF in *file Name*.
The file will have its original line endings in your working directory
(And so on for each file)

4. Create repository on GitHub (do not add readme)


Confirm. = New page will open

5.Create the remote connection( git remote add *name* *the link given by the repo
on GitHub*)
Confirm. = Repeat step twice. Second time:
fatal: remote *name* already exists.

5.25. Push the files(git push -u *name* main)


Confirm. = Branch 'main' set up to track remote branch 'main' from 'merge'.

5.5. Commit the changes( git commit -m"The first Commit")


Confirm. = [master (root-commit) 7bd3032] The first Commit
3 files changed, 245 insertions(+)
create mode 100644 index.html
create mode 100644 sketch.js
create mode 100644 style.css
(Almost same for all the files)

______________________________

1. Check differences and changes(git diff --staged)


Confirm. git

2.
______________________________

6.Push the gitHub files to the repository by master(git push -u github master)
Confirm. =
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 2.65 KiB | 678.00 KiB/s, done.
Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/vatsgoyal27/Tic-Tac-Toe-Game/
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'github'.
(Almost the same. Look for the last line which is the most important)

7.Copy and Paste the link in step 5 on google. This opens the repository u created!
Confirm. = The site will open and the files u added will be listed
8. Copy and send the link to WhiteHat.

9033098857

You might also like