git - the simple guide - no deep shit! git - the simple guide just a simple guide for getting started with git. no deep shit ;) by Roger Dudler credits to @tfnico, @fhd and Namics this guide in deutsch, español, français, indonesian, italiano, nederlands, polski, português, русский, türkçe, မြန်မာ, 日本語, 中文, 한국어 Vietnamese please report issues on github Infuse analytics everywhere with the AI-powered embedded analytics platform. setup Download git for OSX Download git for Windows Download git for Linux create a new repository create a new directory, open it and perform a git init to create a new git repository. checkout a repository create a working copy of a local repository by running the command git clone /path/to/repository when using a remote server, your command will be git clone username@host:/path/to/repository workflow add & commit You can propose changes (add it to the Index) using git add <filename> git add * This is the first step in the basic git workflow. pushing changes branching update & merge tagging log useful hints guides
GUI Clients Scott Prager : Clean your branch's history before commiting. You make a small change to the code, but it's incomplete; doesn't compile or fully implement the feature you want. You want to save your work and try something, but you don't want your history littered with small or incorrect commits. Commit anyway! When you're done with the feature, run $ git rebase -i <master/develop/other> The -i stands for interactive and prompts the fallowing screen: pick 9977ead Commit 2+1/2 pick e1f203f Commit 2+2/2 pick 1a07d53 Commit 3 ## Below this is what git added to the file. # Rebase 17a84ad..1a07d53 onto 17a84ad## Commands:# p, pick = use commit# r, reword = use commit, but edit the commit message# e, edit = use commit, but stop for amending# s, squash = use commit, but meld into previous commit# f, fixup = like "squash", but discard this commit's log message# x, exec = run command (the rest of the line) using shell## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.
Rewriting History Many times, when working with Git, you may want to revise your commit history for some reason. One of the great things about Git is that it allows you to make decisions at the last possible moment. You can decide what files go into which commits right before you commit with the staging area, you can decide that you didn’t mean to be working on something yet with the stash command, and you can rewrite commits that already happened so they look like they happened in a different way. This can involve changing the order of the commits, changing messages or modifying files in a commit, squashing together or splitting apart commits, or removing commits entirely — all before you share your work with others. In this section, you’ll cover how to accomplish these very useful tasks so that you can make your commit history look the way you want before you share it with others. Changing the Last Commit Changing your last commit is probably the most common rewriting of history that you’ll do. to this:
Qt Development Tools Git Set up git At the heart of GitHub is an open source version control system (VCS) called Git. Git is responsible for everything GitHub-related that happens locally on your computer. To use Git on the command line, you'll need to download, install, and configure Git on your computer. If you want to work with Git locally, but don't want to use the command line, you can instead download and install the GitHub Desktop client. For more information, see "Getting Started with GitHub Desktop." If you don't need to work with files locally, GitHub lets you complete many Git-related actions directly in the browser, including: Setting up Git Next steps: Authenticating with GitHub from Git When you connect to a GitHub repository from Git, you'll need to authenticate with GitHub using either HTTPS or SSH. Connecting over HTTPS (recommended) If you clone with HTTPS, you can cache your GitHub password in Git using a credential helper. Connecting over SSH Celebrate Congratulations, you now have Git and GitHub all set up!
Gitolite + Git Configuration Gitolite is a nice tool which allows you to manage Git repositories from a single user account; ssh keys are used to change access to the said repositories. It provides more flexibility compared to . Gitolite manages several repositories under a single user account, using SSH keys for user identification. Installing gitolite¶ If the package is masked, unmask it. emerge dev-vcs/gitolite-gentoo Once gitolite is installed, the 'git' user will be created (with no password and /var/lib/gitolite/ as home). Setting up gitolite¶ Generate a key for root¶ su ssh-keygen -t rsa Two files will be created, /root/.ssh/id_rsa.pub /root/.ssh/id_rsa which are the public/private rsa key pair. Create a configuration repository¶ Copy the public key: cp /root/.ssh/id_rsa.pub /tmp/id_rsa.pub Initiate gitolite: sudo -H -u git gl-setup /tmp/id_rsa.pub Remove the public key from /tmp: rm /tmp/id_rsa.pub chmod 700 /var/lib/gitolite/repositories/gitolite-admin.git Configure the repository for the user¶ Cd to /tmp: cd /tmp
Ignoring files From time to time, there are files you don't want Git to check in to GitHub. There are a few ways to tell Git which files to ignore. Create a local .gitignore If you create a file in your repository named .gitignore, Git uses it to determine which files and directories to ignore, before you make a commit. A .gitignore file should be committed into your repository, in order to share the ignore rules with any other users that clone the repository. GitHub maintains an official list of recommended .gitignore files for many popular operating systems, environments, and languages in the github/gitignore public repository. If you already have a file checked in, and you want to ignore it, Git will not ignore the file if you add a rule later. git rm --cached Create a global .gitignore You can also create a global .gitignore file, which is a list of rules for ignoring files in every Git repositories on your computer. git config --global core.excludesfile ~/.gitignore_global Explicit repository excludes
Git Distributed version control software system Git ()[8] is a distributed version control system that tracks versions of files. It is often used to control source code by programmers collaboratively developing software. Git was created for use in the development of the Linux kernel by Linus Torvalds and others developing the kernel.[13] Git is a free and open-source software shared under the GPL-2.0-only license. The trademark "Git" is registered by the Software Freedom Conservancy, marking its official recognition and continued evolution in the open-source community. Today, Git is the de facto standard version control system. Torvalds wanted a distributed system that he could use like BitKeeper, but none of the available free systems met his needs. These criteria eliminated every version-control system in use at the time, so immediately after the 2.6.12-rc2 Linux kernel development release, Torvalds set out to write his own.[12] The read-me file of the source code elaborates further:[34]
Migrer un projet SVN vers GIT - yterium.net Depuis que j’ai compris que Git c’est facile, je suis de plus en plus enclin à l’utiliser couramment. De plus, j’apprécie vraiment le service et les facilités proposés par GitHub comme son interface de consultation, la gestion des issues, le zip automatique des tags. Mais j’ai aussi un historique de développement sous SVN, avec plein de petits projets développés et versionnés sur mon serveur SVN accouplé à une interface TRAC. C’est donc au cas par cas que je migre chacun de ces petits projets sous Git, ce qui me permet tout à la fois de passer à Git, d’améliorer grandement mon confort de consultation par l’interface web, et de faciliter les contributions externes. Nous allons voir deux cas pratiques de migration, en commençant par un projet simple sans branche, puis en essayant d’importer un projet avec ses branches et ses tags. Un cas simple 1. On va utiliser pour importer la fonction git svn. La syntaxe est simple. git svn clone gitzone 2. 3. et vérifions : 5.
CSS Practice: Pseudo-Namespaces in Complex Projects · Jens O CSS Practice: Pseudo-Namespaces in Complex Projects Jens O. Meiert, March 21, 2007 (↻ August 16, 2013). This entry has been written by Jens the Web Developer. Working in complex projects or in projects that don’t provide a good overview of forthcoming page types and elements may require a defensive strategy for writing CSS. This namespace concept is only roughly similar to that in XML. Examples for CSS Pseudo-Namespaces Special icons for certain links mean an artificial example yet a good start: Assume you want to equip certain links (for example those for file types or for actions) with different icons. This is fine (though you could cultivate that with an additional file class, for example). You can of course address this issue with context dependent formatting (a.doc vs. div.doc), which is usually an advisable thing. A “pseudo-namespace” might help, for example: The nf- prefix is of course arbitrary, in this case meaning “namespace [for] format”. .nf-doc {} .nf-pdf {} .nf-ppt {} Read More
Community Mailing List Questions or comments for the Git community can be sent to the mailing list by using the email address git@vger.kernel.org. Bug reports for git should be sent to this mailing list. You do not need to subscribe: you will be Cc'd in replies. Please keep the Cc list intact when replying (use "Reply to all"). By subscribing (click here), you can make sure you're not missing follow-up discussions and you can also learn about other development in the community. Windows-specific questions can also be sent to the Git for Windows mailing list (if in doubt whether your question is Windows-specific, just use the general Git mailing list). There is also Git user mailing list on Google Groups which is a nice place for beginners to ask about anything. Bug Reporting Bugs in git can be reported directly to the mailing list (see above for details). Bugs related to this website can be reported at its issue tracker. Reporting Security Issues IRC Channel Contributing to Git