You are on page 1of 9

Kaif@Kaif-Notebook MINGW64 ~

$ git --version
git version 2.8.1.windows.1
Kaif@Kaif-Notebook MINGW64 ~
$ git config --global user.name "kaif akhtar"
Kaif@Kaif-Notebook MINGW64 ~
$ git config --global user.email "kaif@gmail.com"
Kaif@Kaif-Notebook MINGW64 ~
$ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=kaif akhtar
user.email=kaif@gmail.com
Kaif@Kaif-Notebook MINGW64 ~
$ git config --global user.name "kaif akhtasr"
Kaif@Kaif-Notebook MINGW64 ~
$ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=kaif akhtasr
user.email=kaif@gmail.com
Kaif@Kaif-Notebook MINGW64 ~
$ git config --global user.name "kaif akhtar"
Kaif@Kaif-Notebook MINGW64 ~
$ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=kaif akhtar
user.email=kaif@gmail.com
Kaif@Kaif-Notebook MINGW64 ~
$ git config user.email
kaif@gmail.com
Kaif@Kaif-Notebook MINGW64 ~
$ git help
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday)
add Add file contents to the index
mv Move or rename a file, a directory, or a symlink
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
examine the history and state (see also: git help revisions)
bisect Use binary search to find the commit that introduced a bug
grep Print lines matching a pattern
log Show commit logs
show Show various types of objects
status Show the working tree status
grow, mark and tweak your common history
branch List, create, or delete branches
checkout Switch branches or restore working tree files
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
merge Join two or more development histories together
rebase Reapply commits on top of another base tip
tag Create, list, delete or verify a tag object signed with GPG
collaborate (see also: git help workflows)
fetch Download objects and refs from another repository
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
Kaif@Kaif-Notebook MINGW64 ~
$ git help commit
Launching default browser to display HTML ...
Kaif@Kaif-Notebook MINGW64 ~
$ pwd
/c/Users/Kaif
Kaif@Kaif-Notebook MINGW64 ~
$ cd ~
Kaif@Kaif-Notebook MINGW64 ~
$ pwd
/c/Users/Kaif
Kaif@Kaif-Notebook MINGW64 ~
$ cd ~
Kaif@Kaif-Notebook MINGW64 ~
$ cd..
bash: cd..: command not found
Kaif@Kaif-Notebook MINGW64 ~
$ pwd
/c/Users/Kaif
Kaif@Kaif-Notebook MINGW64 ~
$ cd.
bash: cd.: command not found
Kaif@Kaif-Notebook MINGW64 ~
$ cd..
bash: cd..: command not found
Kaif@Kaif-Notebook MINGW64 ~
$ ls
'Adobe Flash Builder 4.6'/
AndroidStudioProjects/
AppData/
'Application Data'@
Contacts/
Cookies@
Desktop/
Documents/
Downloads/
Favorites/
IntelGraphicsProfiles/
Links/
'Local Settings'@
Music/
'My Documents'@
NetHood@
ntuser.dat
ntuser.dat.LOG1
ntuser.dat.LOG2
NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf
NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001
.regtrans-ms
NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002
.regtrans-ms
ntuser.dat{9020b86d-d588-11e5-aa8f-907c16f261b3}.TM.blf
ntuser.dat{9020b86d-d588-11e5-aa8f-907c16f261b3}.TMContainer00000000000000000001
.regtrans-ms
ntuser.dat{9020b86d-d588-11e5-aa8f-907c16f261b3}.TMContainer00000000000000000002
.regtrans-ms
ntuser.dat{d930368f-d59f-11e5-9e3c-9f5f34d7bab0}.TM.blf
ntuser.dat{d930368f-d59f-11e5-9e3c-9f5f34d7bab0}.TMContainer00000000000000000001
.regtrans-ms
ntuser.dat{d930368f-d59f-11e5-9e3c-9f5f34d7bab0}.TMContainer00000000000000000002
.regtrans-ms
ntuser.ini
OneDrive/
Pictures/
PrintHood@
Recent@
'Saved Games'/
Searches/
SendTo@
'Start Menu'@
Templates@
Tracing/
Videos/
Kaif@Kaif-Notebook MINGW64 ~
$ cd Desktop
Kaif@Kaif-Notebook MINGW64 ~/Desktop
$ cd tunA
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA
$ pwd
/c/Users/Kaif/Desktop/tunA
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA
$ git init
Initialized empty Git repository in C:/Users/Kaif/Desktop/tunA/.git/
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ ls
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ ls -la
total 12
drwxr-xr-x 1 Kaif 197121 0 May 1 02:20 ./
drwxr-xr-x 1 Kaif 197121 0 May 1 02:15 ../
drwxr-xr-x 1 Kaif 197121 0 May 1 02:20 .git/
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add .
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git commit -m "This is our first comment"
[master (root-commit) 2e4b7d6] This is our first comment
1 file changed, 1 insertion(+)
create mode 100644 git command.txt
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git log
commit 2e4b7d60f3c5a288d676cd5e2d725993dcf2dd3f
Author: kaif akhtar <kaif@gmail.com>
Date: Sun May 1 02:28:19 2016 +0530
This is our first comment
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git log --author="kaif"
commit 2e4b7d60f3c5a288d676cd5e2d725993dcf2dd3f
Author: kaif akhtar <kaif@gmail.com>
Date: Sun May 1 02:28:19 2016 +0530
This is our first comment
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git log --author="kaiaf"
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
nothing to commit, working directory clean
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
git command - Copy.txt
nothing added to commit but untracked files present (use "git add" to track)
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
nothing to commit, working directory clean
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add git command - Copy
fatal: pathspec 'git' did not match any files
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add git command - Copy.txt
fatal: pathspec 'git' did not match any files
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
git command - Copy.txt
nothing added to commit but untracked files present (use "git add" to track)
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ ^C
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add git command - Copy.txt
fatal: pathspec 'git' did not match any files
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add 2.txt
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: 2.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
3.txt

Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)


$

Kaif@Kaif-Notebook MINGW64 ~
$ cd ..
Kaif@Kaif-Notebook MINGW64 /c/Users
$ pwd
/c/Users
Kaif@Kaif-Notebook MINGW64 /c/Users
$ cd ~
Kaif@Kaif-Notebook MINGW64 ~
$ pwd
/c/Users/Kaif
Kaif@Kaif-Notebook MINGW64 ~
$ cd Desktop
Kaif@Kaif-Notebook MINGW64 ~/Desktop
$ cd tunA
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git commit -m "adding second changes"
[master ad53852] adding second changes
1 file changed, 1 insertion(+)
create mode 100644 2.txt
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git log
commit ad538527bff67d18ed05694234e5df1282291acf
Author: kaif akhtar <kaif@gmail.com>
Date: Sun May 1 03:15:15 2016 +0530
adding second changes
commit 2e4b7d60f3c5a288d676cd5e2d725993dcf2dd3f
Author: kaif akhtar <kaif@gmail.com>
Date: Sun May 1 02:28:19 2016 +0530
This is our first comment
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
3.txt
nothing added to commit but untracked files present (use "git add" to track)
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add 3.txt
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: 3.txt

Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)


$ git commit -m "the third file is now joining friends"
[master 421ff01] the third file is now joining friends
1 file changed, 1 insertion(+)
create mode 100644 3.txt
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git log
commit 421ff019164567fd5fc716e352be249ef49423da
Author: kaif akhtar <kaif@gmail.com>
Date: Sun May 1 03:16:47 2016 +0530
the third file is now joining friends
commit ad538527bff67d18ed05694234e5df1282291acf
Author: kaif akhtar <kaif@gmail.com>
Date: Sun May 1 03:15:15 2016 +0530
adding second changes
commit 2e4b7d60f3c5a288d676cd5e2d725993dcf2dd3f
Author: kaif akhtar <kaif@gmail.com>
Date: Sun May 1 02:28:19 2016 +0530
This is our first comment
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: git command.txt
no changes added to commit (use "git add" and/or "git commit -a")
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add git command.txt
fatal: pathspec 'git' did not match any files
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add git command.txt
fatal: pathspec 'git' did not match any files
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add it command.txt
fatal: pathspec 'it' did not match any files
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add it command.txt
fatal: pathspec 'it' did not match any files
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add gitcommand.txt
fatal: pathspec 'gitcommand.txt' did not match any files
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add git_command.txt
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: git_command.txt
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: git command.txt

Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)


$ git commit -m "rename git command file to git_command"
[master b7b6e60] rename git command file to git_command
1 file changed, 2 insertions(+)
create mode 100644 git_command.txt
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: git command.txt
modified: git_command.txt
no changes added to commit (use "git add" and/or "git commit -a")
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add .
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: git command.txt
modified: git_command.txt

Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)


$ git commit -m "rename git command file to git_command"
[master 6815ae1] rename git command file to git_command
2 files changed, 1 insertion(+), 2 deletions(-)
delete mode 100644 git command.txt
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
nothing to commit, working directory clean
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: git_command.txt
no changes added to commit (use "git add" and/or "git commit -a")
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git diff
diff --git a/git_command.txt b/git_command.txt
index 6a174ce..d1bc5d2 100644
--- a/git_command.txt
+++ b/git_command.txt
@@ -1,2 +1,2 @@
git --version
-git --version 2
+git --version 3
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git add .
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git commit -m "rename git command file to git_command"
[master 1e65097] rename git command file to git_command
1 file changed, 1 insertion(+), 1 deletion(-)
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$ git diff
Kaif@Kaif-Notebook MINGW64 ~/Desktop/tunA (master)
$

You might also like