background preloader

Git

Facebook Twitter

Multiple SSH keys for different github accounts. Create different public key create different ssh key according the article Mac Set-Up Git $ ssh-keygen -t rsa -C "your_email@youremail.com" Please refer to github ssh issues for common problems. for example, 2 keys created at: ~/.ssh/id_rsa_activehacker ~/.ssh/id_rsa_jexchan then, add these two keys as following $ ssh-add ~/.ssh/id_rsa_activehacker $ ssh-add ~/.ssh/id_rsa_jexchan you can delete all cached keys before $ ssh-add -D finally, you can check your saved keys $ ssh-add -l Modify the ssh config $ cd ~/.ssh/ $ touch config $ subl -a config Then added #activehacker account Host github.com-activehacker HostName github.com User git IdentityFile ~/.ssh/id_rsa_activehacker #jexchan account Host github.com-jexchan HostName github.com User git IdentityFile ~/.ssh/id_rsa_jexchan Clone you repo and modify your Git config clone your repo git clone git@github.com:activehacker/gfs.git gfs_jexchan cd gfs_jexchan and modify git config then use normal flow to push your code Another related article in Chinese.

Comment utiliser Git | University of Avignon and Open Source Software. Comme promis, nous allons dans ce billet donner une rapide introduction à l’utilisation de Git pour les administrateurs système souhaitant gérer les mises à jour de leurs installations, ainsi que pour les contributeurs dans une seconde partie. Utilisation du dépôt pour maintenir facilement votre installation Première récupération des sources Vous voulez récupérer les sources de FileZ ou RdvZ avec Git et vous avez bien raison, voici donc quelques explications. FileZ et RdvZ sont des projets appartenant à l’utilisateur UAPV sur GitHub, vous pouvez donc les voir à cette adresse : En consultant la page de ces projets, vous pouvez récupérer l’URL du dépôt qui s’initialise comme ceci : git clone rdvz Vous voilà donc avec une copie du dépôt courant sur votre machine !

Choisir la version utilisée Hormis si vous souhaitez tester une nouvelle fonctionnalité, il est déconseillé de se placer sur la dernière modification envoyée par un développeur. Gérez vos codes source avec Git. Ignore 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 in 5 Minutes. Learn git one commit at a time.

Documentation. Documentation Reference Reference Manual The official and comprehensive man pages that are included in the Git package itself. Quick reference guides: GitHub Cheat Sheet | Visual Git Cheat Sheet Book Pro Git The entire Pro Git book written by Scott Chacon and Ben Straub is available to read online for free. Videos See all videos → External Links The External Links section is a curated, ever-evolving collection of tutorials, books, videos, and other Git resources. Version Control for Designers. – This works on the assumption the person has no previous knowledge about SCM – What have you done for me lately? Version control, also known as source control or revision control is an integral part of any development workflow. Why? It is essentially a communication tool, just like email or IM, but it works with code rather than human conversation.

Version control allows programmers to easily communicate their work to other programmersallows a team to share codemaintains separate “production” versions of code that are always deployableallows simultaneous development of different features on the same codebasekeeps track of all old versions of filesprevents work being overwritten What is version control? Version control, alternately known as revision control or source code management, is a system that maintains versions of files at progressive stages of development. There are many different programs for version control. Repository Structure Figure 1: A basic source control system Branches.