Version control for Domino Designer projects - using command line Git (aka the HARDCORE way)
Designer 8.5.3 has built-in capability to link NSF/NTF files with so called on-disk projects that can be used by version control systems. That alone is not enough to successfully use version control systems directly from Designer. But it is enough to use them from the command line! From now on I'm assuming that you've created on-disk project out of one of your NSF/NTF files and this on-disk project is called "git_test".
1. Install Git for Windows
You can download Git for Windows here. Simply run downloaded file and leave all settings in default values. Of course you can adjust these settings if you know what you're doing :) This should add Git Bash icon to your desktop. Double click it to open the Bash prompt.
2. Start using it
On-disk project is just folder with files and sub-folders within your workspace folder. Start Git Bash, go to workspace folder under your Notes/data (i.e. cd "C:Program Filesibmlotusnotesdataworkspace"), locate the folder with the name of the on disk project (in our case type cd git_test) and type git init, followed by git add -A and git commit -a -m 'initial import'". After execution of these commands your on-disk project is "saved" to the Git repository located in ".git" subfolder. git init creates empty repository, git add -A adds all the files in current folder (and all subfolders) to git's index and git commit -a actually saves current state of all those files to the repository (Git tracks changes only in files that has been added to its index).
After you make some changes to original NTF/NSF, switch back to command line prompt and simply type git add -A followed by git commit -a -m "here put your comment". If you omit -m parameter, Git will open text editor for you to enter your comment there.
Every time you create a new design element you have to add it to Git's index by typing git add name_of_file.
More advanced usage is to select what changed files are going to be commited, not commiting them all. This is convenient in case you've made some changes to several design elements but you want to have those changes saved as two separate steps (commits). For example if you've fixed two bugs or added two new features (or more, of course).
Instead of git commit -a you can use git commit name_of_file1name_of_file2 ... -m "here put your commit description"
To find out what files has been modified and/or added you can use command git status
In the next part I'll show you how to install and use git-flow and how to tweak your command prompt to show you some valuable information about the state of your on-disk project's repository.
Fri, Mar 21st 2014 10:15a Martin Jinoch In the beginning of this week I've attended the best European "Lotus related" conference called now Engage, up until last year named BLUG.
For the first time it has taken place outside of Belgium in a nice city called Breda located one hour (by fast train) from Amsterdam. Venue was very also interesting - Chassé Theater.
There is no need to point out that organization of the conference was fantastic, because that is automatically assumed when you know who is organizing it - Theo Heselmans. [read] Keywords: domino
Speaking at BLUG...I mean ENGAGE
Sat, Mar 15th 2014 1:11p Martin Jinoch Tomorrow morning I'll be heading to the airport to catch flight to Amsterdam and then via train to Breda to attend ENGAGE conference (it used to be called BLUG). I'm always looking forward to being there. I hope to meet a lot of old friends and even more new ones. I persuaded a couple of Lotus-positive friends to come this year, so be prepared for more Czech geeks :-)
This is my second time as a speaker on this event so I'm even more excited to go there. Paul Withers and I will be presenting [read] Keywords: domino
Automatic building of NSF from (git) repository
Thu, Feb 6th 2014 8:49a Martin Jinoch I finally had some time to try new "experimental" feature that has been added to IBM Notes in 9.0.1 release. And it is the ability to automatically take repository containing so called on-disk project and build NSF out of it. Which is something you probably do daily, but you have to do it manually in Designer.
After couple of tweets about this matter Jonathan Roche from IBM offered me help in case I have any problems. I always have problems ;-) But this was easy... What was missing in slides f [read] Keywords: domino
Thu, Jan 23rd 2014 7:08a Martin Jinoch This year's last digit is going to be the first digit of my age. And that makes me think a lot. Because I always considered age as something not important. I have friends of all ages and have never really cared about how old is a person I'm dealing with. But since my very good friend died 5 years ago and my father died nearly 2 years ago, I started to be aware of age a bit.
I still feel like being in my late twenties except I no longer can drink all night and be ready next morning. Nope, it t [read] Keywords: domino
Domino Designer and .git folder mystery
Wed, May 1st 2013 8:36a Martin Jinoch Twitter conversation about version control has brought me to the debate about .git folder appearing in NSF file and how to avoid having it there.
I remember seeing one NSF file with .git folder in it a while ago and I've deleted it from NSF without any consequences. NSF is still fine, git repository it is connected to as well. But Cameron Gregor (and probably Sean Cull too) had different experience.
Cameron was kind enough to "record" how this happens on his computer. When I was reproducing [read] Keywords: domino
Mon, Mar 25th 2013 2:12p Martin Jinoch I am writing this at Brussels airport on Sunday afternoon waiting for evening flight back to Prague. Since Wednesday when we came to Leuven to attend BLUG 2013, weather got really bad and although we have March 24 whole Brussels (and Antwerpen and I am sure more other places) are covered by snow and it is freezing out there. Yet even this really unpleasant ending could not spoil great feeling I have about this year's BLUG. In fact all previous BLUGs as well. This was my third. First one in 2011 [read] Keywords: domino
Call doc.closeMIMEEntities after touching doc.getMIMEEntity
Tue, Jan 22nd 2013 6:14a Martin Jinoch Another stupid mistake has taken a lot of my time last week. I developed a small library to provide function(s) to move attachments from rich text fields to separate db (nsf or some other). This function was supposed to be part of bigger process, so saving of document being processed was meant to happen in other code. That is why I had not tested what doc.save() would do. My tests were just checking destination db for created records containing moved files. Other part of process was developed by [read] Keywords: domino
Dynamic binding of fields bug?
Mon, Jan 21st 2013 3:32a Martin Jinoch I was developing very simple XPages component recently and because it was basically loop through a list of field names (and the task was to show something for each of them) I have used repeat control and inside of it there was custom control with properties such as fieldName (String), label (String), isRequired (boolean) and so on. In the custom control I was binding fileDownload and fileUpload controls (based on read/edit mode) to document field via EL as "document1[compositeData.fieldName]" [read] Keywords: notes
Wanna use Git (with DDE) and you're afraid of command line? Try GitHub for Windows
Fri, Jul 6th 2012 6:14a Martin Jinoch Last two blog posts were about using Git and git-flow with DDE. I use command line as main working interface when interacting with Git repositories. I am used to it, I am more productive this way.
But If you're not used to use CLI, there is GitHub for Windows available for you. Go try it!
And if Git doesn't sound familiar to you, try it in your browser, without the need to install anything.
version control [read] Keywords: interface