This is my personal study note for remembering and reviewing what I learned about Git.
The questions I had while I was study about Git.
- To move HEAD upward, using ^ or ~. But Is there any commands to move downward?
- For commit_SHA, codecademy said using first seven digits, but learningitbranching said using shorter if git can resolve the commit.
- Using checkout -b or branch -u to track one to another, but is there any command to untrack?
- If I rebase branch1 under branch2, branch1 and branch 2 is on same tree, then what about the original tree for branch 1? is it deleted? if not, is it possible to back track that branch again?
- Is it right explanation?
“git fetch: To up-to-date the project on your local. It does not update master branch, but the origin/master branches only which is the remote branch. It does not actually change any of local files. Basically, it means create another remote branch which is called origin/master on local and downloads all the commits to the new branch. HEAD stays where it were.” - confusing this
git push origin (source):(destination): To set the location of origin of (destination) at (source) on local and push the source to destination on remote. Note that it is possible to create a new branch on the remote repository in case it does not exist on remote.
** learningitbranching.js.org REMOTE tab, Advanced git remotes, #5 - git fakeTeamwork: To update the remote branch directly?? without any fetch or pull or push??
I am studying these from the web https://www.codecademy.com/learn/learn-git with seven days free trial, and https://learngitbranching.js.org/ which is totally free to learn.