Zoom
Trash
Related: Git git
Git tortoisegit - Where are git database files stored on windows The Git Parable Git is a simple, but extremely powerful system. Most people try to teach Git by demonstrating a few dozen commands and then yelling “tadaaaaa.” I believe this method is flawed. Such a treatment may leave you with the ability to use Git to perform simple tasks, but the Git commands will still feel like magical incantations. Doing anything out of the ordinary will be terrifying. Until you understand the concepts upon which Git is built, you’ll feel like a stranger in a foreign land. The following parable will take you on a journey through the creation of a Git-like system from the ground up. The Parable Imagine that you have a computer that has nothing on it but a text editor and a few file system commands. Snapshots Alfred is a friend of yours that works down at the mall as a photographer in one of those “Special Moments” photo boutiques. You start your project in a directory named working. Branches After a bit of time on the project, a candidate for release begins to emerge. Branch Names
Setting up a cloned git repo I was going to set up a clone of the xserver git repo in my people.freedesktop.org home directory and I figured I'd document the steps. If you want the cheat sheet just skip to the last couple of paragraphs. First of all, to set up a repo I need ssh access to people.freedesktop.org, but since I was going to put the repo in my home directory there, I already have that. Now, the official git repos are read only mounted on /git, so the obvious thing to do is to say krh@annarchy:~$ git clone --bare /git/xorg/xserver.git xserver.git Initialized empty Git repository in /home/krh/xserver.git/ ... krh@annarchy:~$ du -sh xserver.git/ 24M xserver.git/ Most of this space is in the objects representing the files, directories and commits of the project history. krh@annarchy:~$ du -sh /git/xorg/xserver.git/ 135M /git/xorg/xserver.git/ But given that both repos are on the same filesystem, we can ask git clone to share the underlying objects. krh@annarchy:~$ touch xserver.git/git-daemon-export-ok
tortoisegit - Porting TortoiseSVN to TortoiseGit Git Version of TortoiseSVN. It is a port of TortoiseSVN for Git. TortoiseGit supports you by regular tasks, such as committing, showing logs, diffing two versions, creating branches and tags, creating patches and so on (see our Screenshots or documentation). You're welcome to contribute to this project (help on coding, documentation, Translation, testing preview releases or helping other users on the mailing lists is really appreciated). If you upgraded to TortoiseGit 1.8.8.0 and TortoisePLink reports "missing MSVCR110.dll", go to TortoiseGit settings, Network and select "TortoiseGitPLink.exe" as ssh client (which is located in the TortoiseGit\bin directory; issue #2156 ). There seems to be a bug in the MFC library, so please make sure you have the latest service pack installed. The latest and recommended release of TortoiseGit is: 1.8.8.0, see ReleaseNotes for details. Download TortoiseGit System prerequisites and installation howto Get a full list of screenshots. Context menu Commit Dialog
First-Time Git Setup Now that you have Git on your system, you’ll want to do a few things to customize your Git environment. You should have to do these things only once; they’ll stick around between upgrades. You can also change them at any time by running through the commands again. Git comes with a tool called git config that lets you get and set configuration variables that control all aspects of how Git looks and operates. These variables can be stored in three different places: /etc/gitconfig file: Contains values for every user on the system and all their repositories. On Windows systems, Git looks for the .gitconfig file in the $HOME directory (%USERPROFILE% in Windows’ environment), which is C:\Documents and Settings\$USER or C:\Users\$USER for most people, depending on version ($USER is %USERNAME% in Windows’ environment). Your Identity The first thing you should do when you install Git is to set your user name and e-mail address. Your Editor $ git config --global core.editor emacs Your Diff Tool
Git Basics So, what is Git in a nutshell? This is an important section to absorb, because if you understand what Git is and the fundamentals of how it works, then using Git effectively will probably be much easier for you. As you learn Git, try to clear your mind of the things you may know about other VCSs, such as Subversion and Perforce; doing so will help you avoid subtle confusion when using the tool. Git stores and thinks about information much differently than these other systems, even though the user interface is fairly similar; understanding those differences will help prevent you from becoming confused while using it. Snapshots, Not Differences The major difference between Git and any other VCS (Subversion and friends included) is the way Git thinks about its data. Figure 1-4. Git doesn’t think of or store its data this way. Figure 1-5. This is an important distinction between Git and nearly all other VCSs. Nearly Every Operation Is Local Git Has Integrity Git Generally Only Adds Data
Git - SVN Crash Course Welcome to the Git version control system! Here we will briefly introduce you to Git usage based on your current Subversion knowledge. You will need the latest Git installed; There is also a potentially useful tutorial in the Git documentation. This page is not maintained anymore! How to Read Me In those small tables, at the left we always list the Git commands for the task, while at the right the corresponding Subversion commands you would use for the job are listed. Before running any command the first time, it's recommended that you at least quickly skim through its manual page. Things You Should Know There are couple important concepts it is good to know when starting with Git. Repositories. Commiting For the first introduction, let's make your project tracked by Git and see how we get around to do daily development in it. Now your tree is officially tracked by Git. That's it. Git embeds special information in the diffs about adds, removals and mode changes: Browsing Merging Going Remote
Recherche et téléchargement de fichiers sur Github Github est un service formidable où les gens stockent leurs codes sources et leurs projets... Mais c'est aussi une mine d'or de fichiers en tout genre. Certains utilisateurs de Github font d'ailleurs preuve de négligence et synchronisent même parfois des fichiers contenant des mots de passe en clair ou des infos plus ou moins confidentielles. Pour effectuer ce genre de recherches sur Github, il existe un petit script python qui permet tout simplement de récupérer sur votre ordinateur, les fichiers qui vous intéressent. Par exemple, en tapant : . vous récupérerez tous les historiques bash qui trainent. . vous récupérerez tous les htpasswd qui trainent . vous récupérez des boites mails qui trainent . et des logins/passwords de connexions à des bases de données. Je ne passe pas tout en revue. Pour installer ghrabber, il faut faire un petit : sudo easy_install pip sudo pip install beautifulsoup requests Puis téléchargez ghrabber ici. Vous avez aimé cet article ?
Git One of the things I didn't touch on at all in the book is the git rerere functionality. This also came up recently during one of my trainings, and I realize that a lot of people probably could use this, so I wanted to let you all now about it. The git rerere functionality is a bit of a hidden feature (Git actually has a lot of cool hidden features, if you haven't figured that out yet). There are a number of scenarios in which this functionality might be really handy. This same tactic can be used if you want to keep a branch rebased so you don't have to deal with the same rebasing conflicts each time you do it. The other situation I can think of is where you merge a bunch of evolving topic branches together into a testable head occasionally. To enable the rerere functionality, you simply have to run this config setting: $ git config --global rerere.enabled true Now let's see a simple example. #! When we merge the two branches together, we'll get a merge conflict: Our merge is undone.