# Git Info

## GIT Info

First, here are two links that came handy for me to visualize on GIT:

Please note below commands are really meant for the reference for me, not everything may make sense. The commands are what I use often on daily basis.

### Merge

Similarly for the other way,

### Rebase - interactive mode

To move the entire feature branch to begin on the tip of the master branch,

### Pull

Git pull is basically of fetch + merge/rebase. Fetch won’t update your working tree, but merge/rebase do.

### Cherry-Pick

Which will include “Signed-off-by: " in commit message

### Rebase

Combining the commits, or merging the branch into master

### Stash

will save your work into local disk somewhere to be pulled out later. It is most useful when you would like to save your work to work on something else.

this will pull out the most recent work you saved using git stash. It is important to match the branch name same as the time you stashed. Otherwise, there would be a bunch of conflicts as in most of the time, your code will be very different.

It will list what has been stashed so far. Like the example below:

Now above first location such as “stash@{3}” indicates the id of stash reference you can pull out. For example, you can run a command such as git stash pop stash@{3} which will pop out the 3rd commits out of the list into your current branch. Make sure you change your branch to what branch it used to stash.

You can also specify a name to a stashed object rather than “stash@{3}” or there are other commands you can do with the stash. Please refer to this website for detail.