GIT FETCH
- downloads commits, files, and refs(contents) from a remote repository into your local repo. Fetching is what you do when you want to see what everybody else has been working on.
... but it doesn't force you to actually merge the changes into your repo. Git isolates fetched content as a from existing local content, it has absolutely no effect on your local development work.Fetched content has to be explicitly checked out using the git checkout command.
...it does not update your local repo's working state, leaving your current dwor intact
GIT PULL
- git pull is more aggressive alternative, it will download the remote content for the active local branch and immediately execute git merge to create a merge commit for the new remote content.
GIT MERGE
- git merge is used to combine two branches. ...Once git finds a common base commit it will create a new "merge commit" that combines the changes of each queued merge commit sequence.
-preparing to merge
1. Confirm the receiving branch
2. Fetch latest remote commits / or pull to update local changes
3.merging...
--git merge <branch name>
GIT RESET
-git reset will move the HEAD ref pointer and the current branch ref pointer.
the default invocation of git reset has implicit arguments of --mixed and HEAD.
--hard
the commit history ref pointers are updated to the specified commit. then the staging index and working directory are reset to match that of the specified commit.
--mixed
the ref pointers are updated. the staging index is reset to the state of the specified commit. any changes that have been undone from the staging index are moved to the working directory.
--soft
the ref pointers are updated and the reset stops there. The staging index and the working directory are left untouched.
- downloads commits, files, and refs(contents) from a remote repository into your local repo. Fetching is what you do when you want to see what everybody else has been working on.
... but it doesn't force you to actually merge the changes into your repo. Git isolates fetched content as a from existing local content, it has absolutely no effect on your local development work.Fetched content has to be explicitly checked out using the git checkout command.
...it does not update your local repo's working state, leaving your current dwor intact
GIT PULL
- git pull is more aggressive alternative, it will download the remote content for the active local branch and immediately execute git merge to create a merge commit for the new remote content.
GIT MERGE
- git merge is used to combine two branches. ...Once git finds a common base commit it will create a new "merge commit" that combines the changes of each queued merge commit sequence.
-preparing to merge
1. Confirm the receiving branch
2. Fetch latest remote commits / or pull to update local changes
3.merging...
--git merge <branch name>
GIT RESET
-git reset will move the HEAD ref pointer and the current branch ref pointer.
the default invocation of git reset has implicit arguments of --mixed and HEAD.
--hard
the commit history ref pointers are updated to the specified commit. then the staging index and working directory are reset to match that of the specified commit.
--mixed
the ref pointers are updated. the staging index is reset to the state of the specified commit. any changes that have been undone from the staging index are moved to the working directory.
--soft
the ref pointers are updated and the reset stops there. The staging index and the working directory are left untouched.
댓글
댓글 쓰기