background preloader

Book

https://git-scm.com/book/fr/v2

Related:  Git gitGit

Installation · Tig - Text-mode interface for Git Build settings are read from the file config.make and for certain systems also from contrib/config.make-$kernel. An example of the latter is Mac OS X, where contrib/config.make-Darwin provides out-of-the-box configuration for using the system ncurses library and linking with the iconv library. This makes it easy to configure the build without having to use the configure script. As a side note, configure itself generates a config.make file. Apart from the different standard make build variables (CC, CFLAGS, etc.) and standard configure variables (prefix, bindir, etc.), build settings can be one of the following flags: NO_SETENV: Define this variable to enable work-around for missing setenv().NO_MKSTEMPS: Define this variable to enable work-around for missing mkstemps().NO_WORDEXP: Define this variable to enable work-around for missing wordexp().NO_BUILTIN_TIGRC: Reduce the size of the binary by not including a built-in tigrc.

git-add Documentation This command updates the index using the current content found in the working tree, to prepare the content staged for the next commit. It typically adds the current content of existing paths as a whole, but with some options it can also be used to add content with only part of the changes made to the working tree files applied, or remove paths that do not exist in the working tree anymore. The "index" holds a snapshot of the content of the working tree, and it is this snapshot that is taken as the contents of the next commit. Thus after making any changes to the working tree, and before running the commit command, you must use the add command to add any new or modified files to the index. -force considered harmful; understanding git's -force-with-lease - Atlassian Developer Blog Reading Time: 5 minutes Git’s push --force is destructive because it unconditionally overwrites the remote repository with whatever you have locally, possibly overwriting any changes that a team member has pushed in the meantime. However there is a better way; the option –force-with-lease can help when you do need to do a forced push but still ensure you don’t overwrite other’s work. It’s well known that git’s push --force is strongly discouraged as it can destroy other commits already pushed to a shared repository.

Resetting, Checking Out & Reverting The git reset, git checkout, and git revert commands are some of the most useful tools in your Git toolbox. They all let you undo some kind of change in your repository, and the first two commands can be used to manipulate either commits or individual files. Because they’re so similar, it’s very easy to mix up which command should be used in any given development scenario. In this article, we’ll compare the most common configurations of git reset, git checkout, and git revert. Hopefully, you’ll walk away with the confidence to navigate your repository using any of these commands.

Cheatsheet · robbyrussell/oh-my-zsh Wiki To try it out if you have just cloned it (to your home directory): source ~/.oh-my-zsh/templates/zshrc.zsh-template Commands See ~/.oh-my-zsh/lib/directories.zsh Alias git-remote Documentation With no arguments, shows a list of existing remotes. Several subcommands are available to perform operations on the remotes. add

Tutorial: Organize your commits through git rebasing and Jetbrains IDEs Interactive mode options skip : marking a commit with skip will erase the commit from the active branch history. Use this if you know the commit does not provide anything useful to the history, such as a commit with only white space fixing.reword : Allows you to change selected commit comment. Good if you made a typo or add more information about the commit. git annuler toutes les modifications non validées ou non enregistrées This will unstage all files you might have staged with git add:git resetThis will revert all local uncommitted changes (should be executed in repo root):git checkout .You can also revert uncommitted changes only to particular file or directory:git checkout [some_dir|file.txt]Yet another way to revert all uncommitted changes (longer to type, but works from any subdirectory):git reset --hard HEADThis will remove all local untracked files, so only git tracked files remain:git clean -fdxWARNING: -x will also remove all ignored files! To sum it up: executing commands below is basically equivalent to fresh git clone from original source (but it does not re-download anything, so is much faster): git reset git checkout . git clean -fdx

git reset --hard ==> come back to the previous commit. git reset --hard origin/<branch> git clean -f ==> erase all unversioned files by drone May 6

git branch -d feature/xxx_backup ==> del old backup branch git checkout -b feature/xxx_backup ==> create new backup of current branch git checkout - ==> switch back to the original branch by drone Apr 15

git add [my file or . for all] ==> put file(s) in the stage area git commit -a -m "my comment" git push [nom-distant] [nom-de-branche] ==> ex : git push origin master git status git reset [file] ==> undo a git add [file] ZSH git by drone Aug 1

Related: