Git Basic
The basic Git workflow goes something like this:
1. You modify files in your working directory.
2. You stage the files, adding snapshots of them to your staging area.
3. You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.
Command Steps
Check Status : $ git status -àUntracked files: (use “git add <file>)
working directory to staging area -à $ git add newFile.text
Staging area to local repository -à $ git commit -m “Put message” Git Repo
local repository to Git Repo à use push command
git push origin/master
set origin
sannj@LAPTOP-UN5EJP9K MINGW64 ~/Desktop/Git Test (master)
$ git remote add origin https://gitlab.com/******/gittestingexample.git
Test origin
$ git remote
Origin
sannj@LAPTOP-UN5EJP9K MINGW64 ~/Desktop/Git Test (master)
$ git remote -v
origin https://gitlab.com/*****/gittestingexample.git (fetch)
origin https://gitlab.com/*****/gittestingexample.git (push)
$ git push -u origin master
$ git status
On branch master
Your branch is up to date with ‘origin/master’.
Untracked files:
(use “git add <file>…” to include in what will be committed)
Git Step Low Level.docx
nothing added to commit but untracked files present (use “git add” to track)
$ git add Git\ Step\ Low\ Level.docx
$ git commit -m “GIT LOW LEVEL STEP”
$ git remote
origin
$ git remote -v
origin https://gitlab.com/******/gittestingexample.git (fetch)
origin https://gitlab.com/******/gittestingexample.git (push)
$ git push origin
Git Command List…….
git config
git init
git clone
git add
git commit
git diff
git reset
git status
git rm
git log
git show
git tag
git branch
git checkout
git merge
git remote
git push
git pull
git stash
So, let’s get started!