# 2. Learning Git

## Basics

1. Start your training with the free course: [Try Git](https://try.github.io)
2. It is important to understand the process in [this](http://nvie.com/posts/a-successful-git-branching-model/) article.
   * Memorizing the commands is not important because those are part of the UI in tools like [SourceTree](https://www.sourcetreeapp.com/) as clickable buttons.
3. Watch this [presentation](https://docs.google.com/presentation/d/11gkl1nfHHU1UQnd1n6Z4IaWeKA8PniqMf3TRTbgwe6c/present?slide=id.p4) on `Git Flow` by [Aquid](https://github.com/aquid)
4. Then move on to intermediate courses which require a paid subscription. There is a very good chance that your company already pays for it or could start paying for it. So quickly check with your reporting manager to make use of what's available.
   1. [Git Real](https://www.codeschool.com/courses/git-real)
   2. [Git Real 2](https://www.codeschool.com/courses/git-real-2)
   3. [Mastering Github](https://www.codeschool.com/courses/mastering-github)
5. [Git Hooks](https://www.codeschool.com/screencasts/git-hooks)

## Advanced

1. For those who love research and fully understand everything thus far perfectly ... you can also read up on:
   1. An [interesting](http://blog.rubydubee.com/git/2015/03/01/new-git-flow/) idea on how to do setup gitglow to be slightly different.
   2. [Feature Branches & Pull Requests](https://www.codeschool.com/screencasts/feature-branches-pull-requests)

## FAQs

1. How can we update a `fork` with changes from its source?
   * <https://help.github.com/articles/fork-a-repo#pull-in-upstream-changes>
2. How can we view just the commits that touched a particular line in a file?
   * [Retrieve the commit log for a specific line in a file](http://stackoverflow.com/questions/8435343/retrieve-the-commit-log-for-a-specific-line-in-a-file)
3. How to fix tabs, indentation and whitespaces without changing git history?
   * [Change styling (whitespace) without changing ownership/blame](http://stackoverflow.com/questions/4112410/git-change-styling-whitespace-without-changing-ownership-blame)
   * [Git commit that doesn't override original authors in git blame](http://stackoverflow.com/questions/3945382/git-commit-that-doesnt-override-original-authors-in-git-blame)
4. How can we collect git statistics?
   * <http://stackoverflow.com/questions/1828874/generating-statistics-from-git-repository>
     * <http://gitminer.com/>
     * <http://code.google.com/p/gitinspector/>
5. tbd...


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shoppinpal.gitbook.io/docs-shoppinpal-com/2.-learning-git.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
