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 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

Learn.GitHub - Git Tagging Create signed, unsigned, or lightweight tags to permanantly mark important points in your project history Like most VCSs, Git has the ability to ‘tag’ specific points in history as being important - generally people use this to mark release points (‘v1.0’, etc). In this lesson we will learn how to list the available tags, how to create new tags, and what the different types of tags in Git are. Simply listing the available tags in Git is very straightforward. $ git tag v0.1 v1.3 This will just list them in alphabetical order, so there is no real importance in what order they list out in. You can also search for tags with a particular pattern. $ . There are a two main types of tags in Git - lightweight and annotated. Creating an annotated tag in Git is very simple. $ git tag -a v1.4 -m 'version 1.4' $ git tag v0.1 v1.3 v1.4 The ‘-m’ specifies a tagging message, which is stored with the tag. You can see the tag data along with the commit that was tagged by using the ‘git show’ command:

Java, Compilando pelo prompt | Richard Ikeda Hoje vou mostrar como compilar um programinha em java pelo prompt de comando do Windows. Pra quem não conhece ou não está familiarizado é essa tela abaixo. Antes de usar o prompt devemos fazer algumas configurações primeiro . Você deve ter instalado o SDK do Java que pode ser baixado aqui. Após ter o SDK instalado você precisará anotar alguns caminhos, que servirão de variável para as configurações. Por padrão seria C:\Arquivos de programas\Java\ Procure a versão do sdk que foi instalada no meu caso foi o ‘jdk1.6.0_04‘ acesse esta pasta. Copie em um bloco de notas o caminho até esta pastaC:\Arquivos de programas\Java\jdk1.6.0_04\ dentro dela haverá outras, dentre elas, a pasta lib e a bin você deve anotar esses caminhos também. Pastas Java (Clique na imagem para Ampliar) Agora você deverá acessar seu painel de controle, clicar na opção Sistema, aba Avançado, botão Variáveis de Ambiente. Propriedades do Sistemas Variáveis de Ambiente Após isso abrirá esta janela: Nova Variável de Usuário

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+

How do I edit an incorrect commit message in Git JavaBrasil{Compilando Conhecimentos} 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

Changing Git History This document describes how to modify commit messages in Git after the fact. Changing the Last Commit Message If you only want to modify your last commit message, it is very simple. Just run $ git commit --amend That will drop you into your text exitor and let you change the last commit message. Changing Multiple Commit Messages Now let's assume that you want to modify either multiple commit messages, or a commit message several commits back. If you want to change the last 3 commit messages, or any of the commit messages up to that point, supply 'HEAD~3' to the git rebase -i command. $ git rebase -i HEAD~3 Warning: every commit you see in this list will be re-written, whether you change the message or not. Running this command will give you a list of commits in your text editor that looks something like this: Change the word 'pick' to the work 'edit' for each of the commits you want to change the message for. These instructions tell you exactly what to do. $ git rebase --continue

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. Using Git to manage a web site The HTML source for my (i.e., this) web site lives in a Git repository on my local workstation. This page describes how I set things up so that I can make changes live by running just "git push web". The one-line summary: push into a remote repository that has a detached work tree, and a post-receive hook that runs "git checkout -f". The local repository It doesn't really matter how the local repository is set up, but for the sake of argument, let's suppose you're starting one from scratch. $ mkdir website && cd website $ git init Initialized empty Git repository in /home/ams/website/.git/ $ echo 'Hello, world!' Anyway, however you got there, you have a repository whose contents you want to turn into a web site. The remote repository I assume that the web site will live on a server to which you have ssh access, and that things are set up so that you can ssh to it without having to type a password (i.e., that your public key is in ~/.ssh/authorized_keys and you are running ssh-agent locally).

Disk Inventory X Git Submodules It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other. Here’s an example. Git addresses this issue using submodules. Starting with Submodules Suppose you want to add the Rack library (a Ruby web server gateway interface) to your project, possibly maintain your own changes to it, but continue to merge in upstream changes. $ git submodule add rack Initialized empty Git repository in /opt/subtest/rack/.git/ remote: Counting objects: 3181, done. remote: Compressing objects: 100% (1534/1534), done. remote: Total 3181 (delta 1951), reused 2623 (delta 1603) Receiving objects: 100% (3181/3181), 675.42 KiB | 422 KiB/s, done. Superprojects

Open-sourcing Stylo by Alex MacCaw I learn by setting projects for myself, and so a few months ago I decided to create an app called Stylo. The idea was to let people design basic web apps using a Fireworks-like interface, ultimately exporting the finished design as CSS. I’d always admired complex apps like 280 Slides, so was excited to be building something with similar problems. I started writing the app with CoffeeScript, Spine and Sprockets, my technologies of choice. A month later, after working in the evenings and weekends, I had a basic prototype which you can see a demo of here (webkit only). Have a play around with the app. Now the time has come to open source Stylo, and the code should provide good examples of how to achieve the following: The part of Stylo I’m most proud of is the encapsulation. I’ve written a custom guard task to compile the CoffeeScript down to one file whenever anything changes. One thing I particularly enjoyed learning about was color theory, required for making the canvas color picker.

Map a network drive on a Mac - OS X Daily If you frequently access a file server from a Mac it’s pretty helpful to map the network drive to your desktop. There’s two ways to do this, one method is just mapped for one time use and will reset after a reboot, and another method is a more permanent route that allows the mapped network drive to always appear and mount on your desktop after system reboots and user logins. Map a network drive to Mac OS X This method maps a network drive that will disappear if the network connection drops or if you reboot your Mac: From the Mac OS X Finder, hit Command+K to bring up the ‘Connect to Server’ windowEnter the path to the network drive you want to map, ie: and click ‘Connect’Enter your login/password and click “OK” to mount the network driveThe drive will now appear on your desktop and in the Finder window sidebar Map a network drive to Mac OS X that re-mounts after system reboot Make the mapped network drive visible on the Mac desktop