The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,570 other followers

Archive for the ‘Source Code Management’ Category

AlessandroZ/LaZagne: Credentials recovery project

Posted by jpluimers on 2019/04/15

Just when I thought I made a note of a password I hardly ever use, I didn’t, luckily this open source tools understands how to recover many kinds of passwords: AlessandroZ/LaZagne: Credentials recovery project.

–jeroen

Posted in *nix, *nix-tools, Chrome, Development, DVCS - Distributed Version Control, Firefox, git, Internet Explorer, Office, Opera, Outlook, Power User, Python, Scripting, Skype, Software Development, Source Code Management, Web Browsers, WiFi, Windows | Leave a Comment »

git – How to read last commit comment? – Stack Overflow

Posted by jpluimers on 2019/04/12

For only the latest commit message:

git log -1 --pretty=%B

For the full commit without diff:

git log -1

For the full commit including diff:

git show

Via: [WayBack] Often during a commit … I wish to read my last comment to remember what progress I have made (thanks Charles-Bailey!)

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

Woes from last year: While checking in to @plasticscm server and having a branch selected in the PlasticSCM GUI: Error — No checkout branch found.

Posted by jpluimers on 2019/04/03

I bumped into a similar situation again, and my conclusion is that getting out of PlasticSCM woes is more cumbersome to me than getting out of similar git woes.

[WayBack] Jeroen Pluimers on Twitter: “While checking in to @plasticscm server and having a branch selected in the PlasticSCM GUI: ————————— Error ————————— No checkout branch found. ————————— OK —————————… https://t.co/k13K06mOFX”

Basically

---------------------------
Error
---------------------------
No checkout branch found.
---------------------------
OK   
---------------------------

is the Plastic GUI way of saying “I think you have checked out branch A, but while checking that one in, I could not find it on the server, could it be that it got renamed or deleted?”.

The way to reliably get out of this situation (even if you are in a merge):

  1. Make a full backup of your directory tree (robocopy /mir is your friend here)
  2. Keep a note of your check-in comment
  3. Undo your changes in the current branch
  4. Checkout a branch that never got renamed
  5. Quit the Plastic GUI
  6. Start the Plastic GUI
  7. Checkout the branch you want to apply your changes on
  8. Use Beyond Compare to compare the backup tree and the current checked out tree
  9. Sync anything changed using Beyond Compare
  10. Checkin the changes in PlasticSCM using the saved check-in comment

–jeroen

PS, the Twitter thread:

Read the rest of this entry »

Posted in Development, PlasticSCM, Software Development, Source Code Management | Leave a Comment »

During git mv (rename): “unable to unlink old” “invalid argument”

Posted by jpluimers on 2019/03/20

I had an error when doing a rename (mv) in git “unable to unlink old” “invalid argument”. This appeared to be a process having a lock on that file.

In my case, this was a bit hard to track down (I used Process Explorer for it), as the culprit was SourceTree running git in the background to keep an eye on changes in the repository because it has a file system watcher on the repository tree and a different process was writing log files in the same directory structure.

Can you still follow? I had a hard time so here it is in manageable bits:

  1. By default SourceTree has a file system watcher on your repositories
  2. If that watcher fires, SourceTree runs a background git process to get the current state of the repository
  3. If you perform UI actions, SourceTree runs a foreground git process to perform the action
  4. SourceTree does not have a mechanism to wait for the background git process to finish before running the foreground process
  5. I had had another process running that logged into a relative directory that happened to be within the repository tree (but using files excluded by .gitignore)

Basically SourceTree should do two things:

  • keep track of the background process and not fire a foreground one
  • do not start the background process for files excluded by .gitignore

I tracked down what happened using these tips:

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Source Code Management | Leave a Comment »

How can I rename a git stash? – Stack Overflow

Posted by jpluimers on 2019/03/07

SourceTree does not like it when by accident two git stash entries have exactly the same name.

To work around that, you have to rename one.

The easiest way to do this is on the console using the tips from [WayBack] How can I rename a git stash? – Stack Overflow (thanks [WayBack] qzb):

$ git stash list
stash@{0}: WIP on master: Add some very important feature
stash@{1}: WIP on master: Fix some silly bug

First, you must remove stash entry which you want to rename:

$ git stash drop stash@{1}
Dropped stash@{1} (af8fdeee49a03d1b4609f294635e7f0d622e03db)

Now just add it again with new message using sha of commit returned after dropping:

$ git stash store -m "Very descriptive message" af8fdeee49a03d1b4609f294635e7f0d622e03db

And that’s it:

$ git stash list
stash@{0}: Very descriptive message
stash@{1}: WIP on master: Add some very important feature

This solution requires git 1.8.4 or later, and yes, it works with dirty working directory too.

Some other useful git stash commands:

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, SourceTree | Leave a Comment »

 
%d bloggers like this: