0% found this document useful (0 votes)
22 views5 pages

Git Hub

This document outlines basic Git commands for initializing a repository, managing branches, committing changes, and pushing updates. It includes instructions for checking the status of the project, merging branches, and resetting to previous versions. Additionally, it provides commands for viewing branch history and updating branches from the remote repository.

Uploaded by

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

Git Hub

This document outlines basic Git commands for initializing a repository, managing branches, committing changes, and pushing updates. It includes instructions for checking the status of the project, merging branches, and resetting to previous versions. Additionally, it provides commands for viewing branch history and updating branches from the remote repository.

Uploaded by

aziz12063
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Git Manipulate git

Pull commit push


Open git in folder

Write : git init enter

Git remote add origin and past link enter

To verifier

Git remote -v enter

pull
Git branch

Git pull origin master

commit
git status to see status of the project

if I wand add 1 folder

git add name of folder/


if I wand add all folders

git add .

git status to see status of the project all must be green now

git commit -m “write message” to see message

push
git push origin master enter

create a branch named aziz

git branch aziz

switch between branch

git checkout aziz

or

git switch aziz

to check witch branch selected

git branch

merge

to merge branch ‫دمج‬

i’m in branch A I want to merge in it branch B

git merge B
to reinitialize existing access

git init

see history of modification

git log

to open a tree ‫نسخة سابقة‬

git log

select and copy code after commit

write

git checkout paste the code

to open latest

git checkout master or name of branch

if I want create a branch with a version of other branch

git log

copy the code

write

git checkout -b name of branch past the code

to reset project

git log

copy code of the old version to reset to it

git reset –hard past the code

after git log to exit write q or z or h


update branch

git remote update origin –prune

to show all branch

git branch -a

ignore all change and pull


git reset HEAD –hard
git clean -fd
then pull

You might also like