0% found this document useful (0 votes)
24 views3 pages

Mingw64: (Master)

The document shows the steps a user took to initialize a local git repository, make initial commits of files, and push the changes to a remote repository on GitHub. It demonstrates common git commands like git init, git add, git commit, git branch, git remote add, and git push used to set up a basic workflow of tracking and sharing code changes with a remote origin.

Uploaded by

Nasir
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)
24 views3 pages

Mingw64: (Master)

The document shows the steps a user took to initialize a local git repository, make initial commits of files, and push the changes to a remote repository on GitHub. It demonstrates common git commands like git init, git add, git commit, git branch, git remote add, and git push used to set up a basic workflow of tracking and sharing code changes with a remote origin.

Uploaded by

Nasir
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/ 3

cd /c/Users/faiza/test

Faizan@LAPTOP-KJB3QCJN MINGW64 /
$ dir
LICENSE.txt cmd git-bash.exe proc unins001.exe
ReleaseNotes.html dev git-cmd.exe tmp unins001.msg
bin etc mingw64 unins001.dat usr

Faizan@LAPTOP-KJB3QCJN MINGW64 /
$ C
bash: C: command not found

Faizan@LAPTOP-KJB3QCJN MINGW64 /
$ git C
git: 'C' is not a git command. See 'git --help'.

The most similar commands are


am
gc
mv
p4
rm

Faizan@LAPTOP-KJB3QCJN MINGW64 /
$ cd C

Faizan@LAPTOP-KJB3QCJN MINGW64 /C
$ cd /c/Users/faiza/test

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test


$ get init
bash: get: command not found

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test


$ git statusec
fatal: not a git repository (or any of the parent directories): .git

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test


$ echo "# Learning-github" >> README.md

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test


$ git init
Initialized empty Git repository in C:/Users/faiza/test/.git/

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (master)


$ git add README.md
warning: in the working copy of 'README.md', LF will be replaced by CRLF the nex
t time Git touches it

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (master)


$ git commit -m "first commit"
[master (root-commit) 707a5df] first commit
1 file changed, 1 insertion(+)
create mode 100644 README.md

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (master)


$ git branch -M main

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (main)


$ ^[[200~git remote add origin https://github.com/NZ-97/Learning-github.git~
bash: $'\E[200~git': command not found

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (main)


$ git remote add origin https://github.com/NZ-97/Learning-github.git

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (main)


$ git push -u origin main
info: please complete authentication in your browser...
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 228 bytes | 114.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/NZ-97/Learning-github.git
* [new branch] main -> main
branch 'main' set up to track 'origin/main'.

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (main)


$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
(use "git add <file>..." to include in what will be committed)
Demo.txt
info.txt
info1.txt
info2.txt
info3.txt

nothing added to commit but untracked files present (use "git add" to track)

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (main)


$ git add.
git: 'add.' is not a git command. See 'git --help'.

The most similar command is


add

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (main)


$ git add .

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (main)


$ git commit -m "first commit"
[main 2b92b27] first commit
5 files changed, 4 insertions(+)
create mode 100644 Demo.txt
create mode 100644 info.txt
create mode 100644 info1.txt
create mode 100644 info2.txt
create mode 100644 info3.txt

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (main)


$ git push
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 2 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (6/6), 447 bytes | 149.00 KiB/s, done.
Total 6 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/NZ-97/Learning-github.git
707a5df..2b92b27 main -> main

Faizan@LAPTOP-KJB3QCJN MINGW64 ~/test (main)


$
$ git --help
usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[--config-env=<name>=<envvar>] <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
restore Restore working tree files
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
diff Show changes between commits, commit and working tree, etc
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
commit Record changes to the repository
merge Join two or more development histories together
rebase Reapply commits on top of another base tip
reset Reset current HEAD to the specified state
switch Switch branches
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.
See 'git help git' for an overview of the system.

You might also like