08 October, 2020
Q1. How to rebase master in git? Difference between rebase and merge. How to squash or fixup commits?
Rebasing is the process of moving a branch to a new base commit.
The golden rule of git rebase is to never use it on public branches. … The only way to synchronize the two master branches is to merge them back together, resulting in an extra merge commit and two sets of commits that contain the same changes.
Q2. What are Git repository hosting services you used?
Github, Bitbucket, Gitlab or you can specify if you have used something else here.
Q3. What is the syntax for “Rebasing” in Git?
Syntax: “git rebase [new-commit] “
Q4. What are the differences between 'git pull' and 'git fetch'?
Git pull automatically merges the commits without letting you review them first.
Git fetch stores them in your local repository but it not merge them with your current branch. git fetch similar to guit pull but it does not merge the changes.
Q5. What language is used in GIT?
GIT is fast, and ‘C’ language makes this possible by reducing the overhead of runtimes associated with higher languages.
Q6. What is GIT stash?
GIT stash takes the current state of the working directory and index and puts in on the stack for later and gives you back a clean working directory. So in case if you are in the middle of something and need to jump over to the other job, and at the same time you don’t want to lose your current edits then you can use GIT stash.
For an Indepth knowledge on Git, click on below