bookmate game
en
Asciidoctor

Pro Git

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