background preloader

Git - petit guide - no deep shit!

Git - petit guide - no deep shit!

http://rogerdudler.github.io/git-guide/index.fr.html

Related:  Git

git-remote Documentation With no arguments, shows a list of existing remotes. Several subcommands are available to perform operations on the remotes. add Adds a remote named <name> for the repository at <url>. The Designers Guide to Git - Marvel Blog Or anyone who really wants to use it but has no idea how Writing code is hard. For every 1 minute of bliss typing characters in the computer and seeing it render things that didn’t exist before, there are 10 minutes of frustration with unreadable code and bugs that didn’t exist the night before. “Writing code with Git is hard. Git Workflows and Tutorials The array of possible workflows can make it hard to know where to begin when implementing Git in the workplace. This page provides a starting point by surveying the most common Git workflows for enterprise teams. As you read through, remember that these workflows are designed to be guidelines rather than concrete rules. We want to show you what’s possible, so you can mix and match aspects from different workflows to suit your individual needs. Centralized Workflow Transitioning to a distributed version control system may seem like a daunting task, but you don’t have to change your existing workflow to take advantage of Git.

lite No more sending your stuff back and forth via email, just set up a pad, share the link and start collaborating! Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser. Write articles, press releases, to-do lists, etc. together with your friends, fellow students or colleagues, all working on the same document at the same time.

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. This command can be performed multiple times before a commit. How to use Git and GitHub Introduction If you’re having trouble understanding how to get up and running with GitHub, or you just wanted to find a free version-control system and heard about this thing called ‘Git’ then hopefully the following information should help… What is Git/GitHub? When I first heard about GitHub I was unsure as to its purpose and why it was such a hit with other developers. I had never heard of ‘Git’ before and whenever people spoke of GitHub they would mention Git at the same time, and so because they both had ‘Git’ in their name I just assumed they were one and the same thing - which as it turns out was quite wrong indeed. To clarify, ‘Git’ is a program.

Git Reference We've already seen how to use git log to compare branches, by looking at the commits on one branch that are not reachable from another. (If you don't remember, it looks like this: git log branchA ^branchB). However, you can also use git log to look for specific commits. Here we'll be looking at some of the more commonly used git log options, but there are many. Take a look at the official docs for the whole list. git log --author look for only commits from a specific author

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. It helps to think about each command in terms of their effect on the three state management mechanisms of a Git repository: the working directory, the staged snapshot, and the commit history.

Running Bash scripts on Windows – Vegard’s blog The following setup allows one to run Bash scripts from Windows’ command prompt. It also augments it with common Unix commands like cp, rm and mv, which is useful if these are ingrained into muscle memory. Note that this setup affects the command prompt (AKA cmd.exe). Although Windows 10 includes a full-fledged Ubuntu Linux Bash Shell, that shell – like PowerShell – is separate from the command prompt. Therefore, the following instructions still apply to Windows 10, as well as to earlier Windows versions.

Version Control Best Practices Commit Related Changes A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. 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

Get Started with Git If you’re a designer or developer, you’ve probably heard about Git, and you might know that it has become immensely popular, especially among the open source community. Though it may seem cryptic at first, this version control system could change the way you work with text, whether you’re writing code, or a novel. Article Continues Below This article covers why version control is important, how to install the Git version control system, and how to get started with your first repository. git commit - Saving changes to the local repository The "commit" command is used to save your changes to the local repository. Note that you have to explicitly tell Git which changes you want to include in a commit before running the "git commit" command. This means that a file won't be automatically included in the next commit just because it was changed.

Related:  *