Operating System/System Programming(Arif Butt)

Lec 6, 7) Versioning Systems git-1,2

Tony Lim 2021. 6. 15. 12:03
728x90

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.

 

 

 

728x90