Git B10
Git B10
LINUX COMMANDS:
pwd
touch <filename>
touch file1 file2 file3
cat filename
rm -rf filename
ls
ll
ls -lrth
ls -la
clear or ctrl + L
---------------------------------------------------------
mkdir dir1 dir2 dir3
cd dir1
cd ..
rm -rf dir1
=========================
GIT COMMANDS:
user configuration :
----------------------------
git init ---> To initialize a empty repo
git status
touch file1
git status --> Red , UT
-----------------------------------
git reset HEAD fname ---> staging to WS
mailid
pwd
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
------------
git clone https://github.com/devopstraininghub/batch10.git
cd batch10
touch name
git status
git add .
git commit -m "name"
git push ---> errorcode
git pull --rebase
git push
===========
BRANCH :
git branch
git branch
-
--
--
git push origin <br.name>
===========
git branch -d <br.name>
==========
git cherry-pick
-------------
linux :
vi or vim / nano
VIM/ VI editor:
--
vim file3
--------
esc i --- > insert mode
....
.... xyz
....
esc :w
esc :q
or
esc :wq
or
esc :wq!
==========
FILTERING:
===================
TAG :
git tag
===========
================
amend
-----
git commit --amend -m "label" -m "label2" -m "label3"
============
==============================
Alias
-----
git status
git log
git config --global alias.l "log"
git l
======
=========
git stash list
git stash save "label"
APPLY - copy
------
git stash apply
DROP - delete
-----
git stash drop
---------------------
.git/refs/stash
=========
.gitignore
=======================
----------
============================
git pull vs git fetch
========================
==============================
revert
------
git revert cid
profile
===============================
PR (Pull Requests)
protecting main branch
fork - open source project contribution
Interview questions
-- AWS free tier account
--------------------------------