Uncategorized

git commands

review all codes before commit (you must remove test codes)
add commit every minute if you can

git clone
git push origin اسم البرانش
git pull origin اسم البرانش
git config –global تغيير المستخدم والايميل
git config –global user.name “الاسم الجديد”
git config –global user.email “”
git checkout اسم البرانش
git commit -m “رسالة الكوميت”
git add –all اضافة ملفات قبل كوميت وبوش
git remote add origin_name origin_url
git remote show origin     عرض البرانشات على السيرفر
git remote set-url origin “https://hshahien@bitbucket.org/cadrsa/wp.git”   تغيير ال url  +user
git fetch   ينزل كل البرانشات من على السيرفر   بياخد وقت طوييييييييييييييييييل
git checkout -b اسم البرانش    تكريت برنش جديد

git config core.fileMode false
git config core.autocrlf true

git checkout --ours filename.c
git checkout --theirs filename.c
git add filename.c
git commit -m "using theirs"


git diff 
git show (commit number)
git log --author mail@mail.com

gitk file                  to show history of the file

git checkout HEAD — yourfile.php folder to reset only one file
git reset <file> undo commit add 

http://stackoverflow.com/questions/8953206/how-to-i-move-my-commits-from-no-branch-to-an-actual-branch

http://sethrobertson.github.io/GitFixUm/fixup.html

git add -A stages All
git add . stages new and modified, without deleted
git add -u stages modified and deleted, without new

archive last changes
git archive -o update.zip HEAD $(git diff –name-only HEAD^)

git stash pop stash@\{1\}

https://stackoverflow.com/questions/2517339/how-to-recover-the-file-permissions-to-what-git-thinks-the-file-should-be

2 thoughts on “git commands

Leave a comment