You are on page 1of 10

Save it Like it

GIT
Cheatsheet

www.sfectoria.com
(+216) 55 180 992 contact@sfectoria.com
01 Téléchargement
& initialisation
‫ لل‬initialisation ‫تعمل‬
GIT repository
$ git init

‫ و ال‬files‫ بال‬, Github ‫ موجود في ال‬répertoire )‫تنسخ (تحميل‬


. ‫ الكل‬commits ‫ و ال‬branches

$ git clone [ repo url ]

‫ بين‬link ‫تعمل‬

www.sfectoria.com
répertoire locale & Github repository

$ git clone [ repo url ]


02 Configuration
d'identification

‫ متاعك‬Username ‫تعيين ال‬

$ git config --global user.name “[‫“]اسمك‬

‫ متاعك‬Email ‫تعيين ال‬

$ git config --global user.email “[email]“

www.sfectoria.com
03
03 BRANCHES

‫ الي انتي فيها‬branch ‫تعطيك ال‬

$ git branch

‫ جديدة‬branch ‫ ال‬création ‫تعمل‬

$ git branch [branch‫] اسم ال‬

) switch( ‫ جديدة و تحوللها‬branch ‫ ال‬création ‫تعمل‬

$ git checkout -b [ branch ‫] اسم ال‬

www.sfectoria.com
branch ‫تفسخ‬

$ git checkout -b [ branch ‫] اسم ال‬


04
Stage
&
snapshot
staged ‫ و‬modification ‫ الي صارت فاهم‬files ‫توريك ال‬
‫ الجاية‬commit‫لل‬

$ git status

‫ معين لل‬file ‫تزيد‬


staged area

$ git add [ file‫] اسم ال‬

‫ الكل لل‬modification ‫ الي صارت فاهم‬files ‫تزيد ال‬

www.sfectoria.com
staged area

$ git add .
04
Stage
&
snapshot
‫ يفسر اش‬message ‫ و معها‬staged ‫ للخدمة ال‬snapshot ‫تعمل‬
) ‫ يكون مفهوم‬message ‫عملت (مذبينا ال‬

$ git commit -m “[ ‫“]ميساج‬

‫ الي تخدم عليها من‬branch ‫ لل‬updates ‫تعمل‬


remote branch
git merge ‫ و‬git fetch ‫ بين‬combination ‫ هي‬git pull

$ git pull origin <branch‫> اسم ال‬

‫ متع ال‬commits ‫ لل‬uploads ‫تعمل‬

www.sfectoria.com
local branch

$ git push origin <branch‫> اسم ال‬


04
Stage
&
snapshot

‫ بين ال‬synchronisation ‫تعمل‬


remote repository ‫ و‬local repository

$ git fetch

‫ الي‬branch ‫ الي تحب عليها في ال‬branch ‫ لل‬merge ‫تعمل‬


‫تخدم فيها‬

$ git merge]

www.sfectoria.com
THE
05 .GITIGNORE
file

push ‫ساعات تستحق ما تعملش‬


. ‫ معينين‬files ‫ال‬
‫الحاجة هاذي نجمو نعملوها ب‬
‫ اسمو‬file
.gitignore

www.sfectoria.com
Temporary
Commits & Redo
06 Commits

commit ‫ الي صارو في ال‬modifications ‫تنحي ال‬

$ git revert <commit_id>

‫ باش تستعملهم مبعد‬stash ‫ في‬changement ‫تحط ال‬

$ git stash

stash ‫ و تفرغ ال‬stash ‫ الي سجلتو في ال‬changment ‫تحبط ال‬

www.sfectoria.com
$ git stash pop
‫عجبك البوست‬
‫و لقيت فيه افادة تبعنا باش يوصلك كل جديد‬

‫‪www.sfectoria.com‬‬

You might also like