working directory is folder where it has .git file.
statging works as cache between working directory and repository
setting git configuration with global you can also use --local which is default.
store all the needed tracking information.
Head Pointer in git is now pointing to latest commit.
- is changed to + , if they are colored.
by "git checkout -- prog1.c" we can bring our repository prog1.c
we can move HEAD pointer
soft reset = head is move to specified commit ID , no changes in the staging index or working directory
hard reset = same as soft , but staging index and working directory both match the local repository.
Fast forward merge
if there are no more commits on master branch. default is fast forward merge.
before we give merge command, our currnet branch should be the receiving branch
git check out master , git merge new-branch
Real merge
since there are some commit on master branch , only real merge can be performed.
beautiful!
Merge Conflict
happens when both developers change same file and same line.
3 chocies to resolve merge conflict
- abort merge = git merge --abort // cancel merge
- reoslve manually or use merge tools
git stash = hide and save local change. needed when we need to checkout to another branch when our current work is not done we can just hide (save in statsh).
after done doing work on another branch then come back to our working branch and stash apply,pop to get our previous hidden works.
'Operating System > System Programming(Arif Butt)' 카테고리의 다른 글
Lec09) Stack Behind the Curtain (0) | 2021.06.22 |
---|---|
Lec08) Exit Handlers and Resource Limits (0) | 2021.06.18 |
Lec05) GNU autotools and cmake (0) | 2021.06.13 |
Lec04) UNIX make utility (0) | 2021.06.12 |
Lec03) Working of Linkers: Creating your own Libraries (0) | 2021.06.11 |