Posts with the tag: git
How to use Git aliases to increase your productivity
Read in 4 minutes ·Git is a very powerful tool, and it can be a little scary sometimes. It doesn’t matter how long you’ve used it, you will find yourself searching for “how to do X”. Today I want to talk about aliases. Aliases are short, custom made commands that translate into other commands. Aside from saving keystrokes, aliases help you avoiding memorizing command options or digging in your shell history to find the command you need.
Using Dependabot to keep your environment up to date
Read in 3 minutes ·Adding dependencies in a project is seen as a good way to not reinvent the wheel but at the same time it can be concerning in many different aspects: Versioning: sometimes dependencies can require specific versions of other dependencies and this can cause hiccups in your app; Bundling: you need to be careful here to not bring extra code that will bloat your bundles; Updating: JavaScript moves fast and if you don’t update packages regularly, you’ll play Jenga in the future.
My list of GitHub tips and third-party apps
Read in 2 minutes ·I work at Thinkific with 20+ other developers (we are hiring for multiple positions) in different codebases. GitHub is part of our toolkit, and I decided to write a post sharing a few Chrome extensions, integrations and third-party apps that help me be productive as an individual contributor and organized as code reviewer and team lead. Chrome extensions Refined GitHub Sindre Sorhus extension brings a massive list of improvements to GitHub UI and many of them have become part of the product after a bit.
Another dotfiles repository
Read in 2 minutes ·A few days weeks I got a MacBook Air as secondary machine. Since its SSD is smaller than my main Mac I couldn’t use Time Machine. It was definitely a good time to finally create my dotfiles repository. My repository is based in webpro/dotfiles (you may want to check it out his repo to understand this one if you feel lost).
Github webinars
Read in 2 minutes ·Many of us use Github daily however we usually don’t use all its features. On the latest months, its team released a few webinars about how Github uses Github. More than showing the web interface, they talked about their culture and their workflows. In this post, I’m adding the links to the webinars with a few notes.
Serving raw files directly from Github
Read in 1 minute ·We usually create HTML files in our Github repositories, but how to show this data in the browser? RawGit is a solution to serve files with the correct content types. Example: The WordPress readme.html file can be shown in the following URL: https://rawgit.com/WordPress/WordPress/master/readme.html You only need to follow the formula: https://rawgit.com/USER/REPOSITORY/BRANCH/file.html The advantage of using RawGit over Github Pages is that RawGit works with all branches, while Github Pages requires a gh-pages branch.
Replace git author using shell script
Read in 1 minute ·This is an old trick that saved me several times. Sometimes people forget to setup their name and email information. The following script is useful to fix mistakes: #!/bin/sh git filter-branch -f --env-filter ' an="$GIT_AUTHOR_NAME" am="$GIT_AUTHOR_EMAIL" cn="$GIT_COMMITTER_NAME" cm="$GIT_COMMITTER_EMAIL" if [ "$GIT_COMMITTER_EMAIL" = "old@email.com" ] then cn="New author name" cm="new@email.com" fi export GIT_AUTHOR_NAME="$an" export GIT_AUTHOR_EMAIL="$am" export GIT_COMMITTER_NAME="$cn" export GIT_COMMITTER_EMAIL="$cm" ' echo "Run after" echo "git push origin +master:master"
Gource, uma forma estilosa de ver logs do seu controle de versão
Read in 1 minute ·O Catarse é uma plataforma brasileira de crowdfunding que em 2 anos já apoiou mais de 700 projetos, movimentando quase 5 milhões de reais. São números impressionantes, estão todos de parabéns por fazer acontecer, mas não é essa a razão do meu post :) Ao me deparar com seu post de estatísticas, o vídeo da evolução do código-fonte do app deles me chamou a atenção. Ele foi feito com o Gource, que até o momento não conhecia.
Migrando um repositório SVN para GIT
Read in 2 minutes ·Nos últimos dias, pesquisei uma forma de migrar um repositório de SVN para GIT e quando consegui fazer, percebi que era mais fácil que eu imagina. Com isso, resolvi escrever uma receitinha de como fazer isso.
Inicialmente você deve criar um arquivo mapeando seus usuários do SVN para o GIT. Ele deverá ter o formato abaixo:
leonardo = Leonardo Faria <leonardo@email.com>
autor2 = Autor <autor@email.com>
Nota: caso você não queira manualmente escrever esse arquivo, vasculhe o log do seu projeto SVN e obtenha a lista de autores automaticamente:
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors.txt
Sobre Controle de Versão
Read in 3 minutes ·Na disciplina de Engenharia de Software que faço no curso de Sistemas de Informação da Faculdade Pitágoras, fiz um trabalho introdutório sobre Sistemas de Controle de Versão. O trabalho está abaixo e também disponível em PDF.