Push file to remote repo.
Check that the file is in GITHUB
35845@LAPTOP-IP8SV8AD MINGW64 ~ (master)
$ cd /c/
35845@LAPTOP-IP8SV8AD MINGW64 /c (master)
$ mkdir labs3
35845@LAPTOP-IP8SV8AD MINGW64 /c (master)
$ cd labs3
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git init
Initialized empty Git repository in C:/labs3/.git/
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git remote add origin https://github.com/sachit148/Laps3.git
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git remote -v
origin https://github.com/sachit148/Laps3.git (fetch)
origin https://github.com/sachit148/Laps3.git (push)
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ touch labs3.txt
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ dir
labs3.txt
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git add .
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git commit -m "Added new file"
[master (root-commit) fc774eb] Added new file
1 file changed, 3 insertions(+)
create mode 100644 labs3.txt
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git log
commit fc774eb7ad43a5211b94eb86216adbc475e4798b (HEAD -> master)
Author: sachit <
[email protected]>
Date: Tue Sep 15 20:29:57 2020 +0300
Added new file
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git push origin master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 224 bytes | 74.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/sachit148/Laps3.git
* [new branch] master -> master
Create pull request and merge branch to master in GITHUB
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git branch
* master
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git branch b3
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git branch
b3
* master
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (master)
$ git checkout b3
Switched to branch 'b3'
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (b3)
$ git branch
* b3
master
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (b3)
$ git status
On branch b3
nothing to commit, working tree clean
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (b3)
$ git add .
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (b3)
$ git commit
On branch b3
nothing to commit, working tree clean
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (b3)
$
push and create remote branch (Use same remote repo as earlier)
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (b3)
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (b3)
$ git push origin b3
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Writing objects: 100% (3/3), 260 bytes | 130.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/sachit148/Laps3.git
ac220eb..16a75e0 b3 -> b3
Checkout local master and delete local branch
35845@LAPTOP-IP8SV8AD MINGW64 /c/labs3 (b3)
$ git branch
* b3
master