en
Asciidoctor

Pro Git

Сообщить о появлении
Загрузите файл EPUB или FB2 на Букмейт — и начинайте читать книгу бесплатно. Как загрузить книгу?
  • .цитирует6 лет назад
    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 ~.
  • .цитирует6 лет назад
    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.
  • .цитирует6 лет назад
    you run git rm, it stages the file’s removal
  • .цитирует6 лет назад
    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).
  • .цитирует6 лет назад
    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
  • .цитирует6 лет назад
    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
  • .цитирует6 лет назад
    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.
  • .цитирует6 лет назад
    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
  • .цитирует6 лет назад
    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.
  • .цитирует6 лет назад
    To see what you’ve changed but not yet staged, type git diff with no other arguments
fb2epub
Перетащите файлы сюда, не более 5 за один раз