background preloader

Nick Farina - Git Is Simpler Than You Think

Nick Farina - Git Is Simpler Than You Think
It was about one year ago that we switched to Git. Previously, we used Subversion, through the Mac app Versions, which (rightly) holds an Apple Design Award. I made the executive decision to leave our comfy world of Versions because it seemed clear that Git was winning the Internet. There was much grumbling from my teammates, who were busy enough doing actual work thank you very much. But I pressed forward. We signed up for accounts on Github. It might as well have printed PC LOAD LETTER. “Not currently on any branch?!” Maintenance Required Git is not a Prius. By now we all know how to drive Git. Did you know the top result for “git tutorial” is this manpage on kernel.org? So instead let’s pull over, open the hood up, and poke around. The Basics We’ll run through some basic commands to make a repository for our examples: Now we have a git repository with one file and one commit, that is to say, one “version”. ~/mysite$ echo "<center>Cats are cute. With me so far? The Repository User Interface

A Git Primer git is a wicked-powerful distributed revision control system. It is confusing to many, so there are myriad tutorials and explanations online to help people understand it. This one will focus on the fundamental concepts and tasks rather than trying to compete with the documentation. “I’m an egotistical bastard, and I name all my projects after myself. Definitions Working Directory - the working directory is the directory where you have content that you want to manage with git. Commit - a commit is a full snapshot of the contents of your working directory (everything being tracked by git, anyway), and it’s kept track of using a unique 40 character SHA1 hash. Index - the index can be considered a staging area. Branch - a branch is similar in concept to other versioning systems, but in git it’s simply a pointer to a particular commit. Understanding how these components work together is the key to understanding git. git‘s Index $ git status On branch master Branches $ git checkout Remote Repositories

Git Book - Basic Branching and Merging Let’s go through a simple example of branching and merging with a workflow that you might use in the real world. You’ll follow these steps: Do work on a web site. At this stage, you’ll receive a call that another issue is critical and you need a hotfix. Revert back to your production branch. Basic Branching First, let’s say you’re working on your project and have a couple of commits already (see Figure 3-10). Figure 3-10. You’ve decided that you’re going to work on issue #53 in whatever issue-tracking system your company uses. $ git checkout -b iss53 Switched to a new branch "iss53" This is shorthand for: $ git branch iss53 $ git checkout iss53 Figure 3-11 illustrates the result. Figure 3-11. You work on your web site and do some commits. $ vim index.html $ git commit -a -m 'added a new footer [issue 53]' Figure 3-12. Now you get the call that there is an issue with the web site, and you need to fix it immediately. $ git checkout master Switched to branch "master" Figure 3-14. Figure 3-15.

How to Setup SSH Keys on a Linux System - Freedom Penguin On September 9th, 2015 Chris L. asked… Hello Matt and the Freedom Penguin staff! I have a question about generating RSA public and private keys under Linux. Hi Chris! Allow me to let you in on a little secret – I have never used PuTTY or PuTTYGen. First, allow me to acknowledge that most documentation is convoluted. On the client side, Ubuntu comes with the SSH client already installed. The steps we’re going to be taking break down as follows: 1) Generate a key on your local machine. 2) Install OpenSSH Server on remote machine. 3) Send the key to your remote machine. 4) Lockdown the remote machine by removing the password authentication. Step #1 – From your local machine, you need to create RSA keys. On your local machine, in a terminal: mkdir ~/.ssh If it already exists that’s great, let’s make sure the permissions are correct. chmod 700 ~/.ssh chmod 700 ~/.ssh cd ~/.ssh Now let’s create our keys. ssh-keygen -t rsa ssh-keygen -t rsa This will kick out the following cryptic tidbit: Ubuntu 15.04+

A few git tips you didn't know about Notice: some of these commands or flags require git version 1.7.2. On OS X, upgrade easily with Homebrew: brew install git Show branches, tags in git log $ git log --oneline --decorate 7466000 (HEAD, mislav/master, mislav) fix test that fails if current dir is not "hub" 494a414 fix cherry-pick of a commit URL 4277848 (origin/master, origin/HEAD, master) whoops d270fae bugfix: git init -g 9307af3 test deps 8ccc17e 64bb19c bugfix: variable name 546726a dont need you 3a8d7af (tag: v1.3.1) v1.3.1 197f429 (tag: v1.3.0) v1.3.0 a1e1a50 not important 3c6af16 magic `cherry-pick` supports GitHub commit URLs and "user@sha" notation Diff by highlighting inline word changes instead of whole lines $ git diff --word-diff # Returns a Boolean. def command? This flag works with other git commands that take diff flags such as git log -p and git show. Short status output $ git status -sb M ext/fsevent/fsevent_watch.c ?? Push a branch and automatically set tracking

Why You Should Switch from Subversion to Git You may have heard some hubbub over distributed version control systems recently. You may dismiss it as the next hot thing, the newest flavor of kool-aid currently quenching the collective thirst of the bandwagon jumpers. You, however, have been using Subversion quite happily for some time now. It has treated you pretty well, you know it just fine and you are comfortable with it – I mean, it’s just version control, right? You may want to give it a second look. Not just at distributed version control systems, but at the real role of version control in your creative toolkit. Now, this isn’t really a how-to on Git – I won’t be going over a lot of specific commands or get you up and running. The Advantages of Being Distributed Git is a distributed version control system. Now, this gives you a couple of immediate advantages. The other implicit advantage of this model is that your workflow does not have a single point of failure. Lightweight Branches: Frictionless Context Switching In Closing…

Install Snap packages in Arch Linux, and Fedora - OSTechNix In our previous tutorial, we have discussed what is Snap packages, its advantages and disadvantages, where you can get the Snap packages, and how to create your own Snap packages etc. For more details, check our previous article. An introduction to Ubuntu’s Snap packages Today, we will see how to install Snap packages and use them in real time. As you may already know, Snapd, which is used to install Snap packages, comes preinstalled by default in Ubuntu 16.04 LTS. So, we don’t have to install it in Ubuntu 16.04 Desktop or Server. Install Snapd in Arch Linux Snapd is not available in the Arch Linux’s official repositories. To install yaourt, refer the following link: How to install Yaourt on Arch Linux To install packer, check the following link: How to install Packer on Arch Linux After installing yaourt or packer, run the following command to install Snapd: yaourt -S snapd Or packer -S snapd Sample output: Install Snapd Edit snapd PKGBUILD with $EDITOR? sudo systemctl start snapd.socket dnf update

GitHub Firewall Install 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! The up-to-date version of this tutorial is the GitSvnCrashCourse page at the Git wiki. 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. Browsing Merging

Fred's ImageMagick Scripts Licensing: Copyright © Fred Weinhaus My scripts are available free of charge for non-commercial use, ONLY. For use of my scripts in commercial (for-profit) environments or non-free applications, please contact me (Fred Weinhaus) for licensing arrangements. If you: 1) redistribute, 2) incorporate any of these scripts into other free applications or 3) reprogram them in another scripting language, then you must contact me for permission, especially if the result might be used in a commercial or for-profit environment. Usage, whether stated or not in the script, is restricted to the above licensing arrangements. Technical Jargon Last month I posted about hosting a git server under IIS by using GitAspx. While this is certainly one way to host a git server on windows, I wouldn’t recommend this in a production environment. An alternative (and somewhat more stable) approach is to use the native implementation of git-http-backend that ships with msysgit along with Apache. Step 1: Install Git Firstly you’ll need to install msysgit. The current stable version is 1.7.0.2, but this process should also work with the 1.7.1 beta. Once installed, you’ll need to tweak the installation slightly. In order to fix this, copy libiconv2.dll from C:Program Files (x86)Gitbin to C:Program Files (x86)Gitlibexecgit-core Now when you run git-http-backend.exe from a command prompt, the application should run and you should see an HTTP 500 server error: Step 2: Install Apache Next you’ll need to install the Apache webserver. If you visit at this point you should be greeted with Apache’s standard “It works!”

How to get Gitorious running on your own server « Erik On Rails This is everything I’ve figured out so far about how to get Gitorious up and running on your own server. It’s not everything yet, but it’s a lot of stuff. OK, so first you want to install the dependencies. I think this are all of them, assuming you’ve installed the basic rails stuff: apt-get install librmagick-ruby libonig-dev gem install mime-types oniguruma textpow chronic BlueCloth Then make a place for Gitorious and download the code: mkdir /path/for/gitorious; cd /path/for/gitorious git clone cd mainline It’s a good idea at this point to read the HACKING file for informational purposes. The next thing we need to do is create a git user. adduser git Once we’ve created a user, we can create a place for your git repositories. mkdir /path/to/repos chown git:git /path/to/repos You are going to need to add your database settings and gitorious configuration. cp config/gitorious.sample.yml config/gitorious.yml nano config/gitorious.yml; What’s left to do:

Disk Inventory X shadowhand/git-encrypt - GitHub

Related: