0% found this document useful (0 votes)
55 views10 pages

Command For Folder: Initiate

The document shows the steps to set up a local Git repository and push it to GitHub. It configures the user name and email, initializes a new repository, creates files and commits, adds branches, checks out between branches to create different files, merges branches, and pushes the repository to GitHub. It then clones the GitHub repository to download the data locally.

Uploaded by

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

Command For Folder: Initiate

The document shows the steps to set up a local Git repository and push it to GitHub. It configures the user name and email, initializes a new repository, creates files and commits, adds branches, checks out between branches to create different files, merges branches, and pushes the repository to GitHub. It then clones the GitHub repository to download the data locally.

Uploaded by

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

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB

$ git config --global user.name "Bin-T-Adam"


bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB
$ git config --global user.email bintadam@gmail .com
Initiate
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB
$ git init
Initialized empty Git repository in C:/Users/bin/Desktop/GITHUB/.git/
Command for folder
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ mkdir hope (making folder command)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git status
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
while creating commit
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git add .
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git commit -m “first commit”
nothing
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git log -p
fatal: your current branch 'master' does not have any commits yet
creates text file(.txt,.jpg,etc)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ touch f.txt
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ touch f1.txt
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ touch f3.txt
Commit command initial (message )
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git add .
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git commit -m "first commit"
[master (root-commit) fa68f81] first commit
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 f.txt
create mode 100644 f1.txt
create mode 100644 f3.txt
Log command(history)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git log
commit fa68f81d53231902bc90dbf951e494329b938685 (HEAD -> master)
Author: BIN T ADAM <bintadam@gamil .com>
Date: Sun May 26 01:23:39 2016 +0500
first commit
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git status
On branch master
nothing to commit, working tree clean
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git log -p
commit fa68f81d53231902bc90dbf951e494329b938685 (HEAD -> master)
Author: BIN T ADAM <bintadam@gamil .com>
Date: Sun May 26 01:23:39 2016 +0500
first commit
diff --git a/f.txt b/f.txt
new file mode 100644
index 0000000..e69de29
diff --git a/f1.txt b/f1.txt
new file mode 100644
index 0000000..e69de29
diff --git a/f3.txt b/f3.txt
new file mode 100644
index 0000000..e69de29
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git add .
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git commit -m "branch commit"
On branch master
nothing to commit, working tree clean

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)


$ git branch -v
* master fa68f81 first commit
Creates Branches
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git branch log

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)


$ git branch sign

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)


$ git branch A1
Branch history check
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git branch -v
A1 fa68f81 first commit
log fa68f81 first commit
* master fa68f81 first commit
sign fa68f81 first commit
Commit(message)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git add .

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)


$ git commit -m "branch commit"
On branch master
nothing to commit, working tree clean

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)


$ git checkout A1
Switched to branch 'A1'
Changing branches (One branch to another branches)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (A1)
$ git checkout log
Switched to branch 'log'

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (log)


$ git checkout sign
Switched to branch 'sign'
Check status
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (sign)
$ git status
On branch sign
nothing to commit, working tree clean
History
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (sign)
$ git log
commit fa68f81d53231902bc90dbf951e494329b938685 (HEAD -> sign, master, log, A1)
Author: BIN T ADAM <bintadam@gamil .com>
Date: Sun May 26 01:23:39 2016 +0500

first commit

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (sign)


$ git stash list
Commit(message)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (sign)
$ git add .
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (sign)
$ git commit -m "Second branch"
On branch sign
nothing to commit, working tree clean
check branches status
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (sign)
$ git branch -v
A1 fa68f81 first commit
log fa68f81 first commit
master fa68f81 first commit
* sign fa68f81 first commit
Checkout (Move one branch to another branches)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (sign)
$ git checkout master
Switched to branch 'master'

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)


$ git checkout A1
Switched to branch 'A1'

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (A1)


$ touch b1.text

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (A1)


$ git checkout log
Switched to branch 'log'

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (log)


$ touch l1.txt

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (log)


$ git checkout sign
Switched to branch 'sign'

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (sign)


$ touch s1.txt

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (sign)


$ git checkout master
Switched to branch 'master'

bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)


$ git branch -v
A1 fa68f81 first commit
log fa68f81 first commit
* master fa68f81 first commit
sign fa68f81 first commit
Combine (merge)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git merge A1 log sign
Already up to date.
Check branch history(status)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git branch -v
A1 fa68f81 first commit
log fa68f81 first commit
* master fa68f81 first commit
sign fa68f81 first commit

second commit
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
git add .
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git commit -m "branches merge"
[master 61e1a7a] branches merge
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 b1.text
create mode 100644 l1.txt
create mode 100644 s1.txt
Log (history)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git log
commit 61e1a7adf70b873e9fd7f12f05511a4aac8181fa (HEAD -> master)
Author: BIN T ADAM <bintadam@gamil .com>
Date: Sun May 26 01:47:55 2016 +0500

branches merge

commit fa68f81d53231902bc90dbf951e494329b938685 (sign, log, A1)


Author: BIN T ADAM <bintadam@gamil .com>
Date: Sun May 26 01:23:39 2016 +0500

first commit
Work upload online(github) intital
Remote add origin (url) for upload your work on github
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git remote add origin https://github.com/BIN/GitHub
Check status
Push origin command send your entire work on github(website)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git push origin -u --all
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 433 bytes | 72.00 KiB/s, done.
Total 5 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), done.
To https://github.com/BIN/GitHub
* [new branch] A1 -> A1
* [new branch] log -> log
* [new branch] master -> master
* [new branch] sign -> sign
Branch 'A1' set up to track remote branch 'A1' from 'origin'.
Branch 'log' set up to track remote branch 'log' from 'origin'.
Branch 'master' set up to track remote branch 'master' from 'origin'.
Branch 'sign' set up to track remote branch 'sign' from 'origin'.
Remote -v (choices)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git remote -v
origin https://github.com/BIN/GitHub (fetch)
origin https://github.com/BIN/GitHub (push)
Clone (Download your data)
bin@DESKTOP-K12JC4A MINGW64 ~/Desktop/GITHUB (master)
$ git clone https://github.com/BIN/GitHub.git

Cloning into 'GitHub'...


remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 5 (delta 1), reused 5 (delta 1), pack-reused 0
Unpacking objects: 100% (5/5), done.

Student Name BIN T ADAM


Roll No: AIC000000
Assignment: Logins System (Python Mysql)
Teacher:
Trainer Assistant:
Campus: aaaaaaaaaaaaaaa(6:45 - 9:45)
Day: Sunday
Github Link : https://github.com/BIN/Loginsystem-pythmysql-

Student Name: BIN T ADAM


Roll No: AIC000000
Assignment: All Assignments (from 14-April-2016 to 21-July-2016)
Teacher:
Trainer Assistant:
Campus: aaaaaaaaaaaaa (6:45PM - 09:45PM)
Day: Sunday (Evening)
GitHub Link: https://github.com/BIN/GitHub
https://github.com/BIN/pythonAssignment
https://github.com/BIN/Assignment3
https://github.com/BIN/PIAIC-OfficalAssignment
https://github.com/BIN/Loginsystem-pythmysql-
https://github.com/BIN/All-Assignment

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy