اللبوسة

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

/////////////////////// 4 //////////////////////

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 //////////////////////

git branch => (to know your branch)


git remote -v => (to know your remote)
git push (remote name & branch name) ///// git push?? ‫على طول‬

/////////////////////// 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‬‬

‫‪///////////////////////‬‬ ‫‪11‬‬ ‫‪//////////////////////‬‬

‫‪alias‬‬
‫]}"‪] [command || {"command‬االختصار[‪git config --global alias.‬‬
‫‪ex => git config --global alias.st status‬‬
‫"‪ex => git config --global alias.cm "commit -m‬‬

‫‪///////////////////////‬‬ ‫‪12‬‬ ‫‪//////////////////////‬‬

‫‪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‬‬

‫‪///////////////////////‬‬ ‫‪13/14‬‬ ‫‪//////////////////////‬‬

‫‪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‬‬

‫‪///////////////////////‬‬ ‫‪16‬‬ ‫‪//////////////////////‬‬

‫‪reset‬‬
‫لو عندي كذا كوميت وعايز امسحهم بجيب الهاش بتاع الكوميت اللي قبلهم على طول واكتب االمر دا‬
‫]‪git reset --hard [hash of our commit‬‬

‫‪///////////////////////‬‬ ‫‪17‬‬ ‫‪//////////////////////‬‬


‫‪gitignore‬‬

‫‪///////////////////////‬‬ ‫‪18/19‬‬ ‫‪//////////////////////‬‬


‫‪tag‬‬
‫بشوف ايه اللي االصدارات اللي انا عاملها >= ‪git tag‬‬
‫بعمل اصدار جديد بأسم جديد >= ‪git tag v1.0‬‬
‫برفعه على الجيت هب >= ‪git push origin v1.0‬‬
‫بديله كومنت على جيت هب >= "‪git tag -a v1.0 -m"your comment‬‬
‫بسيرش عن االصدارات اللي انا عاملها >= "*‪git tag -l "v1.‬‬
‫بمسحوا من اللوكال >= ‪git tag -d v1.0‬‬
‫بمسحوا من جيت هب >= ‪git push origin --delete v1.0‬‬

You might also like