Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aershov24/db733965903dc0ebdd68d5da9eecb03e to your computer and use it in GitHub Desktop.
Save aershov24/db733965903dc0ebdd68d5da9eecb03e to your computer and use it in GitHub Desktop.
## 10 Hardest Angular Interview Questions
Learn one way to build applications with Angular and reuse your code and abilities to build apps for any deployment target. For web, mobile web, native mobile and native desktop.
##### *Q1*: What is difference between Git vs SVN?
**Difficulty:** ⭐
The main point in Git vs SVN debate boils down to this: Git is a distributed version control system (DVCS), whereas SVN is a centralized version control system.
**Source:** [medium.com](https://medium.com/@gauravtaywade/15-interview-questions-about-git-that-every-developer-should-know-bcaf30409647)
##### *Q2*: What is the command to write a commit message in Git?
**Difficulty:** ⭐
Use:
```sh
git commit -a
```
-a on the command line instructs git to commit the new content of all tracked files that have been modified. You can use
```sh
git add <file>
```
or
```sh
git add -A
```
before git commit -a if new files need to be committed for the first time.
**Source:** [edureka.co](https://www.edureka.co/blog/interview-questions/git-interview-questions/)
##### *Q3*: What is Git fork? What is difference between fork, branch and clone?
**Difficulty:** ⭐⭐
* A **fork** is a remote, server-side copy of a repository, distinct from the original. A fork isn't a Git concept really, it's more a political/social idea.
* A **clone** is not a fork; a clone is a local copy of some remote repository. When you clone, you are actually copying the entire source repository, including all the history and branches.
* A **branch** is a mechanism to handle the changes within a single repository in order to eventually merge them with the rest of code. A branch is something that is within a repository. Conceptually, it represents a thread of development.
**Source:** [stackoverflow.com](https://stackoverflow.com/questions/3329943/git-branch-fork-fetch-merge-rebase-and-clone-what-are-the-differences/)
##### *Q4*: What git command do you need to use to know who changed certain lines in a specific file?
**Difficulty:** ⭐⭐⭐⭐⭐
Use `git blame` - a little feature in git that allows you to see who wrote what in the repository. If you want to know who changed certain lines, you can use the -L flag to figure out who changed those lines. You can use the command:
```sh
git blame -L <line-number>,<ending-linenumber> <filename>
```
**Source:** [github.com/mikeizbicki](https://github.com/mikeizbicki/ucr-cs100/tree/2015winter/textbook/tools/git/advanced-git)
*Thanks 🙌 for reading and good luck on your interview!*</br>*Check more FullStack Interview Questions & Answers 👉 [www.fullstack.cafe](https://www.fullstack.cafe)*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment