## Git
1. What is origin ? _eg. `git push origin master`_
'origin' is the default name for the repository when you run git clone.
its used instead of the original repository`s URL.
it makes referencing easier
'git push origin master' is the command when your project is ready to be shareaable and to push it upstream
2. How can you find the current origin ? and How can you change the origin's url ?
you can find the origin with the command:
git remote -v
you can change the origin`s url through the command:
git remote set-url new.git.url/here

3. **How to merge between 2 branches using `git merge` ?
```
git checkout feature1
git merge master
```
What would happen if you do `git merge master current-branch`**
git-merge - Join two or more development histories together

```
git merge topic
```

4. **different uses of `git-reset`.**
To undo changes, you can go hard, soft and mixed.
**Hard**
Revert to previous commit!
Any changes to tracked files in the working tree since <commit> are discarded.

**Soft**
Tells Git to reset HEAD to another commit, so index and the working directory will not be altered in any way. All of the files changed between the original HEAD and the commit will be staged.
*This differ from commit --amend as:*
* it **doesn't** create a new commit.
* it can actually move HEAD to any commit (as commit --amend is only about not moving HEAD, while allowing to redo the current commit)
**Mixed**
Just like the soft, this will reset HEAD to another commit. It will also reset the index to match it while working directory will not be touched.

---
### Talk about and give a demo of the following commands, when would you use each one?:
- `1. git stash`

[for more watch about -Git stash on Youtube :movie:](https://www.youtube.com/watch?v=Ie1EXmd9k0s)
- `2. git diff` => shows unstaged changes
- `git diff --staged` => shows staged changes


## -3. `git log` => shows commit history


[Git log on Youtube](https://www.youtube.com/watch?v=Jql9qEvaEPc)
- `4. git fetch` =>gits the changes from the remote repository. but it dose not change our locale repo
mening it's not yet merged into our local branch


### Useful links
- [Git documentation](https://git-scm.com/doc)
- [An aggressive blogpost about git :laughing: ](https://ohshitgit.com/)