Git Product home page Git Product logo

gittips's Introduction

GitTips

Comandos GIT para melhoras a produtividade

Localizar em quais commits determinada linha de um arquivo foi modificada

git log -L123,123:caminho/relativo/do/arquivo/arquivo.ext

Listar Branchs abertos em que seu usuário foi o último a dar commit

git ls-remote -h origin | while read b; do PAGER='' git log -n1 --color --pretty=format:'%ct%C(yellow)%d%Creset - %Cred%h%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit $( echo $b | cut -d' ' -f1 ) --; done | sort -rn -k1,10 | cut -c11- | grep "<$(git config user.name)>"

Listar commits aonde houve alteração de uma parte especifica de código (2 formas)

git log -G "PARTE DO FONTE ALTERADO A SER LOCALIZADO" caminho/relativo/do/arquivo/arquivo.ext
for c in $(git log -G "PARTE DO FONTE ALTERADO A SER LOCALIZADO" --format=%H -- caminho/relativo/do/arquivo/arquivo.ext); do
    git --no-pager grep -e "PARTE DO FONTE ALTERADO A SER LOCALIZADO" $c -- caminho/relativo/do/arquivo/arquivo.ext
done

Listar branchs aonde houve alteração de um arquivo especifico

git log --all --first-parent --remotes --reflog --author-date-order -- caminho/relativo/do/arquivo/arquivo.ext

Renomear um branch local e remoto

git checkout <nome_antigo>
git branch -m <nome_novo>
git push origin -u <nome_novo>
git push origin --delete <nome_antigo>

gittips's People

Contributors

fpragana avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.