Skip to main content

How to avoid losing a unused terminal command line

This morning I got a great tip...
I typed a command in my terminal but I wanted to run another command before executing the line that I just typed without loosing the information in the current line.
For instance:
I typed in my terminal the command:
git commit -am "Unit test for scenarios A, B and C"
But I was not sure if I was committing just the scenarios A, B and C that I have changed, I would like to run a git diff before committing but also without losing my committing message...
Then my friend Duck told me to put a # in the begging of the line and... voilà!
# git commit -am "Unit test for scenarios A, B and C"
It transform the line in a comment, so that I could hit enter without executing the commit and that line went to my history so that I could recovery it.
Thanks Duck.

Comments

Post a Comment

Popular posts from this blog

Thunderbird with Microsoft OWA in Ubuntu 11.10

So, you as I are tired of Evolution's problems in Ubuntu 11.10 ? Move on to Thunderbird... To have it working with Microsoft OWA following the these steps: Install DavMail Download and install  DavMail . It will act as a proxy between Thunderbird and your Microsoft webmail. Configure DavMail Some tips:  Exchange 2003: https://mail.company.com/exchange/ Exchange 2007 Webdav mode: https://mail.company.com/owa/ Exchange 2007 EWS mode: https://mail.company.com/owa/ Exchange 2010 EWS mode: https://mail.company.com/owa/ Exchange 2010 EWS mode with unsupported authentication form e.g. Windows Live login:https://mail.company.com/ews/exchange.asmx In my case as I'm behind a proxy I had to mark the option "Use system proxy settings" in the Proxy tab: Click save then you should see a message in your system tray, saying that DavMail is correctly configured. Configuring Thunderbird In Thunderbird main window click menu Fil...

Como é trabalhar na ThoughtWorks

Uma pergunta recorrente que me fazem é: - E ai, como é trabalhar na ThoughtWorks? Bom, vou tentar responder isso... Pra começar é muito diferente de tudo que já vi aqui no Brasil. Nenhuma das empresas pelas quais passei, ou empresas que ouvi amigos próximos falando sobre o dia-a-dia se aproximam do que eu vejo aqui na ThoughtWorks. Isso tanto para bom, quanto para "não tão bom". A ThoughtWorks te contrata para a Thoughtworks não para um projeto Isso pra mim é algo muito bom, a maioria das empresas de consultoria no Brasil quando querem te contratar falam algo do tipo: "Temos um projeto em Alphaville com duração de 6 meses e possibilidade de prorrogação..." Nesse cenário se tem projeto essas empresas contratam como loucas, e quando chega final do ano e os clientes tem um freezee elas demitem! Para em fevereiro do outro ano começarem a contratar de novo. Isso nunca fez sentido para mim. Na ThoughtWorks, quando você é contratado você vira um ThoughtWorker....

3 Milagres

São necessários 3 milagres para virar santo Para virar santo você precisa primeiro fazer 3 milagres. Se você começar numa equipe/empresa nova, lembre-se a não ser que você já seja um autor respeitado você vai precisar conquistar seu espaço/respeito. Para conquistar seu espaço/respeito você precisa fazer as coisas acontecerem. Se esforce e faça os milagres acontecerem, depois de 3 você vira santo e dai as pessoas passam a pedir sua benção.