Git
Git
Neel Soni
Setup and Config
Create Repositories
Make Changes
To commit changes in git git commit -m "[Your Message for this commit]"
Branches
To get specific commit from a branch to current branch git cherry-pick [commit]
and head point to it
To go back to the previous commit by destroying other in- git reset [commit]
between commits
Stash
To bring the changes back and remove from stash list git stash pop
To bring the changes back and not removing from stash git stash apply
list
options:
add – to add repository
remove – to remove repository
To fetch branches and/or tags from other repositories git fetch [option]
option:
--all – to fetch all the branch
--prune – to remove any remote-tracking
references that no longer exist on the remote
To push the changes to the remote repository git push [option] [branch]
options:
origin - specific tag branch
--all - push all branches
To get (pull) changes from a remote repository into the git pull [options] [branch]
current branch options:
-r – rebase the current branch on top of the
upstream branch
--no-rebase – will not perform rebase
Git ignore