Skip to content

Conversation

@aviadfri
Copy link
Collaborator

GIT Bssic

$ touch abc.txt
$ echo "1" >> abc.txt
Yellow (new file)
$ git add abc.txt -White
$ git commit - Red

$ echo "2" >> abc.txt
Brown (when change file)
$git diff main

becuse i create file and than i add text to the file ant after that i done commite to this change the stage tree been cleared
than i do another change but i didnet add it to the index Git diff dont show me anyting

after i add the change to the index Git diff wont show me anything becuse i didnet do anew cahnge
3) no becuse git diff chage show the difrent between the stages not like git diff main that show me the difrrent on the working tree in branch main

resolve conflicts

git branch
git chekout -b feature/coffe
git chekout feature/coffe
git merge/ver1
git merge/ver2

we get conflict

we merge branch git/ver1 into git/coffe

cherry picking

chekout main
we add files .env
we add config.json

cherry piciking its dont important ehice commit you pick becuse its 2 different file so we cant get conflict

change in working tree

chekout feature/coffe2
touch take.txt && echo "bla text" >> aaa.txt
git add aaa.txt
git chekout dev

we get error
we need to do commit or stash before swich branch

do commit/stash

when we forch chekout its not save change in branch dev for aaa.text

reset

git reset soft head1
git reset mixedhead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants