Professional Documents
Culture Documents
اللبوسة
اللبوسة
اللبوسة
1 - working directory & staging area & local repo??? ايه الفرق بينهم
git add . => (to all project) // git add (path your file)
git status
git reset (your file name)
git commit -m "(your description)"
/////////////////////// 5 //////////////////////
/////////////////////// 6 //////////////////////
git pull (your branch) => (git fetch(new updates in this repo) && git merge(merge
updates in local repo))
$$$collaporating
/////////////////////// 7 //////////////////////
git config
/////////////////////// 8 //////////////////////
public key
/////////////////////// 9 //////////////////////
نرفعه لو لسه عاملين ريبو جديد والبروجكت عندنا جاهز وعايزين
git init
git add .
git commit -m ""
git remote add origin (link new repo)
git push -u origin master
/////////////////////// 10 //////////////////////
pull request
alias
]}"] [command || {"commandاالختصار[git config --global alias.
ex => git config --global alias.st status
"ex => git config --global alias.cm "commit -m
branch
عشان اعرف البرانش اللي انا فيه >= git branch
عشان اعمل برانش جديد بأسم جديد >= ]git branch [name of new branch
عشان اغير ابدل ما بين كذا برانش موجودين عندي >= ]git checkout [name of our branch
بتمسح البرانش بعد ما اعملوا ميرج مع الماستر >= ]git branch -d [name of our branch
بتمسح البرانش من غير ميرج عادي >= ]git branch -D [name of our branch
عشان اغير اسم البرانش اللي انا فيه >= ]git branch -m [new name of our branch
اعمل برانش جديد وبيحولني ليه تلقائي >= ]git checkout -b [name of new branch
عشان ادمج البرانشين مع بعض >= ]git merge [name of other exist branch
بترفع الحاجة على الريبو عشان يتعملها بول ريكوست >= ]git push origin [name of our branch
stash
git stash يخزن الحاجة اللي بتبقا في الوركنج دايركتور >=
git stash بيجيب الحاجة اللي انت خزنتها >= list
git stash بيرجعلك اللي الحاجة اللي نت كنت مخزنها وبيمسح الليست اللي عندك >= pop
git stash بيرجعلك اللي الحاجة اللي نت كنت مخزنها وبيمسحش الليست اللي عندك >= apply
git stash بترجعلك الليست اللي انت عايزها لو عندك اكتر من واحدة >= }pop stash@{num. of your list
git stash بتمسح الليست اللي انت مختارها >= }drop stash@{num. of your list
git stash بيعرضلك الحاجة اللي في الليست اللي مختارها >= }show stash@{num. of your list
git stash بتمسح كل اللي انت مخزمه >= clear
/////////////////////// 15 //////////////////////
restore
لو علمت كوميت لكذا فايل وعايز ترجعهم كلهم >= * git restore --stage
لو عايز ارحع فايل معين >= ]git restore --stage [name file will be restored
clean
بيسألك لو عايز تمسح الملفات كلها وبيعرضلك اسمها عشان تتأكد االول >= git clean -n
بترجع الفايل اللي انت عايزه >= ]git add [name file not delete
بتأكد انك عايز تمسح الحاجة >= git clean -f
reset
لو عندي كذا كوميت وعايز امسحهم بجيب الهاش بتاع الكوميت اللي قبلهم على طول واكتب االمر دا
]git reset --hard [hash of our commit