bookmate game
Asciidoctor

Pro Git

Notify me when the book’s added
To read this book, upload an EPUB or FB2 file to Bookmate. How do I upload a book?
  • .has quoted6 years ago
    Another useful thing you may want to do is to keep the file in your working tree but remove it from your staging area. In other words, you may want to keep the file on your hard drive but not have Git track it anymore. This is particularly useful if you forgot to add something to your .gitignore file and accidentally staged it, like a large log file or a bunch of .a compiled files. To do this, use the --cached option:
    $ git rm --cached README
    You can pass files, directories, and file-glob patterns to the git rm command. That means you can do things such as:
    $ git rm log/\*.log
    Note the backslash (\) in front of the *. This is necessary because Git does its own filename expansion in addition to your shell’s filename expansion. This command removes all files that have the .log extension in the log/ directory. Or, you can do something like this:
    $ git rm \*~
    This command removes all files whose names end with a ~.
  • .has quoted6 years ago
    Notice how you don’t have to run git add on the CONTRIBUTING.md file in this case before you commit. That’s because the -a flag includes all changed files. This is convenient, but be careful; sometimes this flag will cause you to include unwanted changes.
  • .has quoted6 years ago
    you run git rm, it stages the file’s removal
  • .has quoted6 years ago
    Doing so launches your editor of choice. (This is set by your shell’s EDITOR environment variable — usually vim or emacs, although you can configure it with whatever you want using the git config --global core.editor command as you saw in Getting Started).
  • .has quoted6 years ago
    For an even more explicit reminder of what you’ve modified, you can pass the -v option to git commit. Doing so also puts the diff of your change in the editor so you can see exactly what changes you’re committing.) When you exit the editor, Git creates your commit with that commit message (with the comments and diff stripped out).
    Alternatively, you can type your commit message inline with the commit command by specifying it after a -m flag
  • .has quoted6 years ago
    If you want to skip the staging area, Git provides a simple shortcut. Adding the -a option to the git commit command makes Git automatically stage every file that is already tracked before doing the commit, letting you skip the git add part
  • .has quoted6 years ago
    If you run git difftool instead of git diff, you can view any of these diffs in software like emerge, vimdiff and many more (including commercial products). Run git difftool --tool-help to see what is available on your system.
  • .has quoted6 years ago
    If you want to see what you’ve staged that will go into your next commit, you can use git diff --staged. This command compares your staged changes to your last commit
  • .has quoted6 years ago
    It’s important to note that git diff by itself doesn’t show all changes made since your last commit — only changes that are still unstaged. If you’ve staged all of your changes, git diff will give you no output.
  • .has quoted6 years ago
    To see what you’ve changed but not yet staged, type git diff with no other arguments
fb2epub
Drag & drop your files (not more than 5 at once)