0% found this document useful (0 votes)
18 views4 pages

Bakh Test 01

Uploaded by

mr.bakh.usb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

Bakh Test 01

Uploaded by

mr.bakh.usb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

git & github Notes:::::::::::::::::::::

/////////////

cd -> change directory

Repository -> project or Folder in github

git vs github

ls -> listing the every thing in the directory

clear -> clear the history

clone ->

add ->

commint->

push ->

pull -> downloa from github repository , oposit of push

-> git clone "http/..............."

-> git status

-> git add -a <name of the file>

-> git commit -m "write a message"

-> git push ****

-> ssh-keygen -t rsa -b 4096 -C "name of the email"

> return >> ...... : testkey

** passphrase : *******

> ls >> testkey

testkey.pub

-> cat testkey

-> cat testkey.pub

** copy this code for creating the SSH key


-> ~ eval "${ssh-agent-s)"

> Agent pid *****

-> ~ ssh-add -K ~/.ssh/id_res <= the address of the key directory you can see it after the ssh code created
(000000000000000)

-> git push origin master<branch we want to push to it>

** better after you creating the repository create the README.md file and talk ablout this ripository

** you can create two or more -m after the commit something

**** for pushing the locally file to the github::

*** creat New empty repositore

-> git remote add origin "http//..... ... ... .git"h

-> git push -u <<origin master>> for short code of youre programming you can use the -u ...

github workflow --> writeCode >> commitChange >> make a pull Request

local gitworkflow --> write code >> stage changes >> commit Changes >> push Changes >> make a pull
Request

gitBranch***

save the update and add it to the file Ok. if change youre branch you can't see you update because it just
saved on that branch**

bulit the new future and work on it seprated to the main branch**

and the after you updatign or debuging you can marg it to the main branch**

-> git branch


-> git checkout

-> git checkout -b <name of the new branch"better vesion of youre code">

** if you write this code

-> git push

>> return git push --set-upstream origin <name of the new branch>

** if you want to push this branch you created without merg it to the main branch***

** create the pull on the github and then affter you see you group's advice then merg it to the main
branch**

-> git pull //origin master

-> git branch -d <name of the branch you want to delet it>

-> git commit -am "message" for short changing

*if you have a two braches and in the branches you have same tag wheh you want to save it you have to
save that tag on the seprated way

#commit1-----------------#commit2-----------------------#commit3

-> git diff

-> git merg <name of the new branch you want to merg it to this branch>

-> git reset <name of the file you want to reset it>

you check it with -> git status

-> git log

**

commit hash**

you reset any changes after this commit*##

-> git reset --hard ............hash........... << you can deleted the whole of the code after this commit
## use fork for if you want to complitle copy of the any repository on you own github

** you can chick this on the github

//////////////

You might also like