Git Product home page Git Product logo

gitinpractice's Introduction

Git In Practice

Git In Practice is an opinionated, intermediate/advanced-level Git book by @MikeMcQuaid.

Table of Contents

  1. Preface
  2. Introduction to Git
    1. Local Git
    2. Remote Git
  3. Git Essentials
    1. Filesystem Interactions
    2. History Visualization
    3. Advanced Branching
    4. Rewriting History and Disaster Recovery
  4. Advanced Git
    1. Personalizing Git
    2. Vendoring Dependencies as Submodules
    3. Working with Subversion
    4. GitHub Pull Requests
    5. Hosting a Repository
  5. Git Best Practices
    1. Creating a Clean History
    2. Merging vs. Rebasing
    3. Recommended Team Workflows
  6. Appendices
    1. Git Installation
    2. Creating a GitHub Account and Repository
    3. Commented Git Configuration
    4. Why Use Version Control?

License

You have the right to read this book through this open source repository, link others to it anywhere on the internet but not redistribute the contents of this repository outside of GitHub.

Supporting

It takes a lot of time from multiple people to write a published book. While the content is available to read freely from this repository, if this content is useful to you and you can afford it, please consider buying a paper or ebook copy from Manning.

Status

Published by Manning in 2014 and given a public GitHub repository in 2017.

Contributing

If you contribute changes to this repository you assign copyright to @MikeMcQuaid and Manning Publications. If a future edition is released we may thank you in the foreword but you won't be assigned partial copyright or receive any royalties. If you're OK with that then please feel free to create pull-requests.

Thanks to all the GitInPractice contributors!

Contact

Mike McQuaid

gitinpractice's People

Contributors

bezthomas avatar chrisbaker97 avatar dr-rompecabezas avatar georgeglessner avatar hmobius avatar justin0022 avatar maxim-belkin avatar maximiliantech avatar mikemcquaid avatar phil-blain avatar schacon avatar stallio avatar strobaek avatar yonigibbs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitinpractice's Issues

Unknown XREFs

In chapter 2, in the second paragraph of the introduction for section 2.2, you reference XREF introduction-to-local-git. This does not resolve.

In chapter 4, at the end of section 4.2, you reference XREF shorten-commands. This does not resolve.

In chapter 6, first sentence of section 6.4, you reference XREF rebasing. This does not resolve either.

Chapter 8: wrong description for `git submodule update`

Hi @MikeMcQuaid,

In chapter 8, in section "Update and initialize all submodules: git submodule update --init", you write :

Sometimes at the same time as initializing a repository, you may want to also update it to the latest revision to incorporate any changes that were made in the upstream, submodule repository. Now that we’ve removed the submodule from our repository, we can initialize the submodule and update it to any later revision.

Then you show git submodule update --init and write :

Discussion

If there had been any changes to the GitInPracticeReduxSubmodule repository then the git submodule update --init command would initialize the submodule in the local repository and then update the stored submodule revision to the latest revision in the local repository.

This is not what git submodule update --init does. To quote the man page:

Update the registered submodules to match what the superproject expects by cloning missing submodules, fetching missing commits in submodules and updating the working tree of the submodules.

The behaviour you describe (updating the submodule to incorporate changes in the upstream, submodule repository, is done with git submodule update --remote :

Instead of using the superproject’s recorded SHA-1 to update the submodule, use the status of the submodule’s remote-tracking branch. [...] The only change is the source of the target SHA-1. For example, submodule update --remote --merge will merge upstream submodule changes into the submodules, while submodule update --merge will merge superproject gitlink changes into the submodules. [...] Use this option to integrate changes from the upstream subproject with your submodule’s current HEAD.


I see a few ways to resolve this:

  • add --remote in that section of the text so that the command matches the text (I think that is not a good idea because git submodule update deserves its own section, it's important to know how to initialize submodules in a fresh clone when you did not clone with --recurse-submodules.)
    or
  • remove the wrong description from the git submodule update --init section and explain that this git submodule update checks out the submodule at the commit recorded in the superproject (and initializes them when also using --init). (And maybe add a separate section about git submodule update --remote.)

I also understand that this book is already published and is in "maintenance" mode, so you might not want to do such big modifications to the content. In that case maybe adding an errata would work ? What do you think ?

Issues with ++ symbol

In chapter 8, C++ is referenced a lot which, when rendered into PDF turns into C followed by text in a different format. Not sure if this is an issue in asciidoc, the XML generated, or the parser.... thought I would flag it though.

You can consider using GitBooks

I think it is a great choice for publishing books like this as it will have search builtin you can use.

Here is the link for it. Thanks for sharing the book.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.