Using GIT for Dataflex Development: Difference between revisions

From DataFlex Wiki
Jump to navigationJump to search
m
Added to Tutorials category
m (Added to Tutorials category)
(22 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Why Version control ==
== Why Version control ==
Before we jump into GIT in specific, it is important to mention some reasons why developers are more productive when using version control;
Before we jump into GIT in specific, it is important to mention some reasons why developers are more productive when using version control;
* We can keeping track of multiple versions deployed
* We can keep track of multiple versions deployed
* Multiple developers can be working on same project
* Multiple developers can be working on same project
* It is helpful with code checks  for auditing or training
* It is helpful with code checks  for auditing or training
Line 7: Line 7:
* We can locate changes for one feature/fix across a number of changed files
* We can locate changes for one feature/fix across a number of changed files
* The code is in a safe location, in case of lost hardware
* The code is in a safe location, in case of lost hardware
* We can find when a located bug introduced, so you can see what clients are effected
* We can find when a located bug was introduced, so you can see what clients are effected
It can be tough when you are looking at a piece of code, not knowing when/how it’s used. But when you can run a version control tool, which shows exactly when those lines were added, by who and with what description, it makes it so much easier to decide what to do with that piece of unknown code, whether it’s retiring it, refactoring, documenting or just leave it as it is.
It can be tough when you are looking at a piece of code, not knowing when/how it’s used. But when you can run a version control tool, which shows exactly when those lines were added, by who and with what description, it makes it so much easier to decide what to do with that piece of unknown code, whether it’s retiring it, refactoring, documenting or just leave it as it is.
Another good reason that warrants its own paragraph is when you are developing using Agile sprints/iterations. Oversimplified, you determine a list of features you or your team are going to implement in order of priority, but your iteration is timeboxed to eg 4 weeks. This means that after 4 weeks all approved and tested code stays in the product and the features that did not make it in full or are not fully tested and or approved, are to be taken out and used for the next sprint/iteration. This warrants for a good use of version control, where each feature can very easy be isolated from the packaged software.
Another good reason that warrants its own paragraph is when you are developing using Agile sprints/iterations. Oversimplified, you determine a list of features you or your team are going to implement in order of priority, but your iteration is timeboxed to eg 4 weeks. This means that after 4 weeks all approved and tested code stays in the product and the features that did not make it in full or are not fully tested and or approved, are to be taken out and used for the next sprint/iteration. This warrants for a good use of version control, where each feature can very easily be isolated from the packaged software.


== Types of version control tools ==
=== Types of version control tools ===
Version control is a way of work, not a tool itself. There are many version control systems, some are more suitable for the VDF development cycle then others. We can identify the following types.
Version control is a way of work, not a tool itself. There are many version control systems, some are more suitable for the VDF development cycle than others. We can identify the following types.
Historical version control was done by directory backups e.g. by using zip and file naming. The result is many near identical copies. It also requires a lot of self discipline.
Historically version control was done by directory backups e.g. by using zip and file naming. The result is very near identical copies. It also requires a lot of self discipline.
Centralised version control has been very popular for years, where you have one centralised server and many remote clients. Examples are CVS, Subversion, Vault, Visual Source Safe and Team Foundation Server. These work very well when you are connected to the server. When not connected these are not giving much assistance.
Centralised version control has been very popular for years, where you have one centralised server and many remote clients. Examples are CVS, Subversion, Vault, Visual Source Safe and Team Foundation Server. These work very well when you are connected to the server. When not connected these are not giving much assistance.
Distributed version control is the latest and most popular peer to peer version control tool. Examples are Mercurial (hg), GIT, BitKeeper etc.
Distributed version control is the latest and most popular peer to peer version control tool. Examples are Mercurial (hg), GIT, BitKeeper etc.
This white paper focuses on the last category the distributed version control, with GIT in particular.
This white paper focuses on the last category of distributed version control, with GIT in particular.
If you are currently using a Centralised version control, you might be interested in the following list of major changes with the Distributed flavour;
If you are currently using a Centralised version control, you might be interested in the following list of major changes with the Distributed flavour;
* No access to a server is required, the distributed VC has a local repository that gets synch’ed with a remote (central or peer to peer) repository when it can but can work fine on its own.
* No access to a server is required, the distributed VC has a local repository that gets synch’ed with a remote (central or peer to peer) repository when it can but can work fine on its own.
* Each developer has its own repository local to their working directory
* Each developer has their own repository local to their working directory
* No file checkout is required, just start changing the files
* No file checkout is required, just start changing the files
* You can stage a number of files, so multiple files can be part of one commit (maintaining the relationship of the changes in the files)
* You can stage a number of files, so multiple files can be part of one commit (maintaining the relationship of the changes in the files)
Line 32: Line 32:


=== Download and install GIT-Gui ===
=== Download and install GIT-Gui ===
Navigate your browser to http://git-scm.com/downloads and download the latest windows version (at time of writing 1.8.0 and about 15Mb in size). Install on your machine, I recommend keeping the installer suggested components, and suggested ‘Adjusting of PATH environment’. The latter helps when creating menu’s in VDF Studio. The ‘Configuring the line ending conversions’, leave for VDF development as checkout as-is, commit as-is.
Navigate your browser to http://git-scm.com/downloads and download the latest windows version (at time of writing 2.10.0 and about 30Mb in size). Install on your machine, I recommend keeping the installer suggested components, and suggested ‘Adjusting of PATH environment’. The latter helps when creating menu’s in DataFlex Studio. The ‘Configuring the line ending conversions’, leave for DF development as checkout as-is, commit as-is.


=== Creating your first repository ===
=== Creating your first repository ===
Let’s create a GIT repository of the Visual Dataflex example Order Entry workspace. This workspace always is clean when VDF is installed but in my case, full of test and other changed code after a while. Being able to go back to the original version seems like a good idea for a first repository.
Let’s create a GIT repository of the Dataflex example Order Entry workspace. This workspace always is clean when VDF is installed but in my case, full of test and other changed code after a while. Being able to go back to the original version seems like a good idea for a first repository.


Start with navigate to and select the workspace directory then use the right click (short cut) menu, and select ‘Git Init Here’ as below.
Start with navigate to and select the workspace directory then use the right click (short cut) menu, and select ‘Git Init Here’ as below.
Line 66: Line 66:
We can teach GIT what files to ignore by placing a file called .gitignore in the workspace directory. The content of the file is;
We can teach GIT what files to ignore by placing a file called .gitignore in the workspace directory. The content of the file is;
  <nowiki>
  <nowiki>
#Exclude the following files for Visual DataFlex Projects
#Exclude the following files for DataFlex Projects
####################################
####################################
programs/*.exe
programs/*.exe
Line 103: Line 103:
You noticed that the commit was really quick, and all panels are blank. You have just created a new repository, told GIT what files to ignore, and committed all other files into the repository.
You noticed that the commit was really quick, and all panels are blank. You have just created a new repository, told GIT what files to ignore, and committed all other files into the repository.


== Setting up the author in GIT ==
=== Setting up the author in GIT ===
When you commit, GIT keeps track of not only the changes, but also of the Author of the changes. In the above initial commit, we did not set this and as DAW is the author this did not really matter, but changed from now on, should have yourself as the author.
When you commit, GIT keeps track of not only the changes, but also of the Author of the changes. In the above initial commit, we did not set this and as DAW is the author this did not really matter, but changed from now on, should have yourself as the author.


Line 114: Line 114:
[[File:UsingGitforVdfDev_image006.png]]   
[[File:UsingGitforVdfDev_image006.png]]   


== Making changes and revert back ==
== Using git ==
 
=== Making changes and revert back ===
We have our safe initial commit so we can make changes to our hearts content.
We have our safe initial commit so we can make changes to our hearts content.


Line 133: Line 135:
Now hold-on you might say, why is this in the branch menu, I would not have looked there... When we look a bit further at branching I promise it will make more sense. If impatience; the short answer is that the master is also a branch.
Now hold-on you might say, why is this in the branch menu, I would not have looked there... When we look a bit further at branching I promise it will make more sense. If impatience; the short answer is that the master is also a branch.


== Creating a branch and making changes ==
=== Creating a branch and making changes ===
As a developer you should not create changes direct in the master branch. Instead you should create a branch specific to the change you want to make (topic branch), and then when you decide to keep the change, merge the topic branch into the master (or even better in a release branch).
As a developer you should not create changes direct in the master branch. Instead you should create a branch specific to the change you want to make (topic branch), and then when you decide to keep the change, merge the topic branch into the master (or even better in a release branch).


Line 192: Line 194:
I inserted ‘Use for_all.pkg’ at the top of the SalesP.vw  code and the code below just before the End_object of the oContainer1;
I inserted ‘Use for_all.pkg’ at the top of the SalesP.vw  code and the code below just before the End_object of the oContainer1;


  <nowiki>
  <source lang="dataflex">
         // This only works from VDF 17.0 where Refresh is also send to containers
         // This only works from VDF 17.0 where Refresh is also send to containers
         Procedure Refresh Integer eMode
         Procedure Refresh Integer eMode
Line 219: Line 221:
             End_Procedure
             End_Procedure
         End_Object
         End_Object
  </nowiki>
  </source>


Switch back to Git Gui and do a rescan (F5). You see that SalesP.vw and probably order.cfg are changed.
Switch back to Git Gui and do a rescan (F5). You see that SalesP.vw and probably order.cfg are changed.
Line 225: Line 227:
If you are happy with the changes, then Stage and commit them.
If you are happy with the changes, then Stage and commit them.


== Merge branches ==
=== Merge branches ===
The previous section might unsettle you a bit. We made two changes, both from the same base code (master) but now we want to compile them both into one test version to give to the testers.
The previous section might unsettle you a bit. We made two changes, both from the same base code (master) but now we want to compile them both into one test version to give to the testers.


Line 268: Line 270:
''Just remember to merge, switch to (checkout) the branch you want to merge into. Then select the branch that you want to merge into the current branch.''
''Just remember to merge, switch to (checkout) the branch you want to merge into. Then select the branch that you want to merge into the current branch.''


== Further changes required on one of the change requests ==
=== Further changes required on one of the change requests ===


As normal the test version comes back with a number of changes that are required. Let’s say that the first one is that the total amount form should not be visible if no record is shown.
As normal the test version comes back with a number of changes that are required. Let’s say that the first one is that the total amount form should not be visible if no record is shown.
Line 296: Line 298:
Switch back to VDF Studio and the SalesP.vw file. Change the Refresh procedure to the following code:
Switch back to VDF Studio and the SalesP.vw file. Change the Refresh procedure to the following code:


  <nowiki>
  <source lang="dataflex">
         // This only works from VDF 17.0 where Refresh is also send to containers
         // This only works from VDF 17.0 where Refresh is also send to containers
         Procedure Refresh Integer eMode
         Procedure Refresh Integer eMode
Line 309: Line 311:
             Forward Send Refresh eMode
             Forward Send Refresh eMode
         End_Procedure
         End_Procedure
  </nowiki>
  </source>


Compile and confirm the code.
Compile and confirm the code.
Line 323: Line 325:
You could decide to create the new branch based on ‘Version2.0Beta1’. I personally don’t see an advantage of this, but you could.
You could decide to create the new branch based on ‘Version2.0Beta1’. I personally don’t see an advantage of this, but you could.


== Branching – Merging wrap-up ==
=== Branching – Merging wrap-up ===


I think each change request should have its own branch. As you have seen above, it is really easy to create branches, merge the changes and create (test) release branches with the features. This has advantages that features that are not complete at the time of release will simply not be merged into that release. All code changes stay in the branch and will be further worked on when you decide to do so. Working properly with branches means there is a minimal risk of issues and make it much easier to make Agile iteration/sprints where a release is time boxed but the less critical features are not.
I think each change request should have its own branch. As you have seen above, it is really easy to create branches, merge the changes and create (test) release branches with the features. This has advantages that features that are not complete at the time of release will simply not be merged into that release. All code changes stay in the branch and will be further worked on when you decide to do so. Working properly with branches means there is a minimal risk of issues and make it much easier to make Agile iteration/sprints where a release is time boxed but the less critical features are not.
Line 329: Line 331:
You could see the topic branches as only developer help. The commits should have the proper references to the code and properly document the changes. Therefore once the topic branch is merged into the master, the topic branch itself can be deleted, as all the commits are inserted into the master branch.
You could see the topic branches as only developer help. The commits should have the proper references to the code and properly document the changes. Therefore once the topic branch is merged into the master, the topic branch itself can be deleted, as all the commits are inserted into the master branch.


= Using GIT during developing & a centralised VCS for releases =
== Using GIT during developing & a centralised VCS for releases ==
 
You might find yourself in an environment where the boss insists on using a centralised version control like VSS or Vault for the releases, but you are keen on using GIT with its awesome branch feature.
 
You would join a great deal of young developers that during their study the last years developed open source software and are very aware of the advantages of GIT. They new find themselves in this situation where they feel they have to do a step backwards.
 
I think, and many online agree that the two VCS’s are not mutually exclusive. You can use GIT during the development, smoke testing or even proper testing and get all the advantages of the development freedom. When it is time for releasing, just check the code into your centralised VCS.
 
== Multiple developers, multiple repositories ==
 
In previous section you got familiar with staging, committing, branching and merging. All of these actions were done on the local repository.
 
More than likely you are working in a team of developers or at least want a safe backup of the repository. In both cases you want to synchronise your local repository with one or more remote repositories.
 
=== Create a remote backup repository  ===
 
To make a backup of your repository you can either use a hosted solution or just on another piece of hardware in the network. The follow the following steps show the latter.
 
In Git Gui choose menu Remote – Add. Give the backup location a name and the path. Although not mandatory, its common to give the foldername a .git extention.
 
[[File:UsingGitforVdfDev image021.png]]
 
Make sure you change the ‘Further Action’ from ‘Fetch Immediately’ to ‘Initialize Remote Repository and Push’, and click Add.
 
'''If you are putting a network drive as the location, make sure you use ‘//drive/dir/dir’ instead of ‘\\drive\dir\dir’. Otherwise you will have issues later on.'''
 
What just happened in simplified terms, is that important content of the workspace .git folder is copied and links are setup between the local and the remote repository. This remote repository is often called a ‘bare repository’ is it does not have a working directory.
 
After you make changes to your local repository, and you would like to update the remote repository, all you have to do is a Push. Menu: Remote – Push or (Ctrl+P);
 
[[File:UsingGitforVdfDev image022.png]]
 
By default the current branch is selected as Source Branch, but you could like above select multiple (Shift or Ctrl left click) branches to be updated.
 
Please note that you are pushing the whole history of commits, not just the latest state.
 
== Creating a local repository from a remote repository ==
 
So your mate has started to use Git in his local repository, and made a backup remote repository on the server. You have to also do some work on this project so you need a local repository.
 
In Git terminology you want to clone an existing repository.
 
''To practice this there is no reason that this would not be on the same machine (just different directory). Even the remote backup created could have been on the same local machine in its own directory.''
 
Start Git Gui from start menu or by right mouse click on any directory that does not have a repository.
 
[[File:UsingGitforVdfDev image023.png]]
 
Click the Clone existing repository link.
 
[[File:UsingGitforVdfDev image024.png]]
 
Enter the location of the Remote repository and the NOT YET CREATED target local repository and workspace.
 
Select the Full Copy, just to be sure. When you’ve worked with Git for a while feel free to experiment with the faster versions, but in the beginning you just want it to work.
 
When clicked clone, navigate your explorer to the new directory and confirm that you have the full workspace, as well as a .git local repository. You also will find the remote automatically added to the ‘Remote’ menu as ‘origin’.
 
''If you added the .gitignore file to not be tracked (my mentioning it in the .gitignore file itself) it was not copied over into the cloned workspace. You probably want to copy this file manually here. It is recommended though that you do stage and commit this file into your repository.''
 
=== Keeping multiple repositories synchronised ===
 
In previous sections you have created a new remote repository with ‘Add remote’, and created new local repository by cloning the repository from the remote.
 
We also discussed that a remote repository can be kept up-to-date with Push.
 
Suppose developer 1 makes a change to a file eg the remaining WinPrint report fonts are all changed from Arial to Segoe ui. The developer stages the files, and does a commit, this saves the changes into the local repository. He then at the end of the day does a push, to update the remote repository with these changes.
 
For developer  2 to retrieve these changes, two actions need to be undertaken. First the local repository needs to be updated using the menu option Remote – Fetch. Then the workspace (working tree in GIT language) needs to be updated with changes from the repository. This done by menu option Merge – Local Merge (or Ctrl+M), leaving the defaults in the merge dialog as Tracking branch.
 
When an automated 3 way merge can be done, this is very simple. When however conflicts occur they are shown to the user, than then can do a proper merge. Once developer 2 is finished merging the developer 1’s changes into their code he makes sure all is committed, then pushes the changes to the remote repository.
 
This sounds more complex than it is. Git also helps you with this. Basically git’s remote repositories do not allow a push, if there are un-fetched (pulled) changes. Therefore the developer would always be prompted to pull, merge, commit and then push.
 
=== Local and Remote branches ===
 
Local branches are not automatically pushed to the remotes. This leaves you with the freedom to use private branches for work you do not want to share.
 
If you do want to collaborate on a branch, you explicitly push the branch to the remote.
 
When a branch is pushed to the remote and other developers do a Fetch, they will automatically receive a reference to new remote branches, but you don’t automatically get editable copies of them (only a ‘origin/<branch>’. So if they want to contribute to the branch, they need to create a Tracking branch based on the remote branch.
 
The tracking branch is to the developer like a local branch, except GIT knows the link to the remote branch, so a push will automatically update the correct remote branch.
In Git GUI and specifically the dialog below the wording of the labels is confusing. Where it reads ‘Tracking branch’ it should be ‘Remote branch’. After all a tracking branch is the result of the action, not the source
 
[[File:UsingGitforVdfDev image025.png]]
 
So this creates a Tracking branch ‘CR5612_UpdateFontsOnReports’ (due to the ‘Match Tracking branch name’ setting), linked to the remote branch ‘origin/ CR5612_UpdateFontsOnReports’.
 
So a Tracking branch is a local branch that has a direct relationship to a remote branch. If you are on a tracking branch and do a push, GIT knows what remote and branch to push to. If you do a pull, It fetches all the remote branches and automatically merges in the changes from the remote branch.
 
=== Collaborating on a topic branches ===
Some great text on [http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project]
 
== Browse repository ==
 
=== Gitk ===
 
Git-gui comes with a basic visualising tool gitk. It shows the commit and branch history, and the files and lines changed in these commits. It has some search facility in commit messages.
 
This visual commit viewer is started from git-gui by the repository menu options ‘Visualise <current branch> History’ and ‘Visualise All Branch History’.
 
[[File:UsingGitforVdfDev image026.png]]
 
This does the job most of the time. But to get the most out of your carefully build version control documentation, you should have a look at git extensions. You can use git extensions exclusively, meaning you do not need any functionality of git-gui. For learning the basics of git, I believe that git-gui is an excellent way and not get lost straight away in the functionality of git extensions.
 
=== Git extensions ===
 
Git extensions is an active open source project. The source code is here https://github.com/gitextensions/gitextensions
 
However the latest version, wrapped in a windows installer is here http://code.google.com/p/gitextensions/  this is most likely the version you want.
 
It comes with a manual, that should after reading this document, be quite easy to follow. Especially chapter 3 browse repository is really good.
 
==== View commit log ====
 
In addition to seeing commit changes just like in gitk, you can also ctrl click any two commits to view the differences.
 
[[File:UsingGitforVdfDev image027.png]]
 
==== Search history ====
 
Using regular expressions in commit message, author and committer.
 
[[File:UsingGitforVdfDev image028.png]]
 
==== Single file history ====
 
[[File:UsingGitforVdfDev image029.png]]
 
==== Blame ====
 
See for every line, when this was committed. Then double click to see other files of that commit.
 
[[File:UsingGitforVdfDev image030.png]]
 
== Tips and Tricks ==
 
=== Unmodifying a modified file ===
 
When you realise you don’t want to keep any changes to a file, you can unmodify it – reverting to what it looked like when you last committed (or cloned or merged etc).
 
In Git Extensions this can be done several ways. One of them is in the commit dialog;
 
[[File:UsingGitforVdfDev image031.png]]
 
[[File:UsingGitforVdfDev image032.png]]
 
=== Renaming of a file ===
 
GIT is really smart. If you rename a file, it detects that a file is missing, a new file appeared and the content is (almost) the same. It just picks it up and accepts the rename of the file as a change you can commit.
 
Extremely cool!
 
=== Libraries used by multiple workspaces ===
 
A great way to have copy of a VDF library workspace within every workspace that uses the library, while the version control helps you detect changes and merge them into the ‘local’ library.
 
More details are here; [http://git-scm.com/book/en/Git-Tools-Submodules]
 
=== Unstage Line from Commit ===
 
Sometimes you might have done a number of changes to a file and forgot to commit these separately, while you would like to.
 
In that case just stage the file, click on the file in the second panel, then in the 3rd panel where you see your code select the lines and use right mouse click to Unstage lines from commit. You could also select stage specific lines when you have not staged the file.
 
''If you cannot select the file, it just switches from Unstaged to Staged, you've click the file icon, instead of the name. Click the name instead.''
 
=== Cherry picking ===
 
Apply a commit from another branch to the current branch. Only the lines changed in the particular commit will be applied.
 
This is the best way to apply e.g. a bug fix, made in the master branch, onto the development branches. Or if doing consecutive commits, in a development branch you only want to pick some to be updated in this new branch.
 
=== Keep uncommitted changes when changing branch (Stash) ===
 
Git protects you from loosing uncommitted changes to your files when changing branches. But sometimes you are just not ready yet to commit. You might be in the middle of some programming that is not ready to compile, while you need to attend to an urgent bug.
 
This function is not (yet?) in Git Gui, but is very handy. You will however find it in git extensions.
 
Alternatively in the command line (right mouse cick on workspace directory, select Git Bash. A command window opens. Run the commands ‘Git add .’ and ;Git stash’.
 
You notice that all changes are ‘removed’ from the working directory and you can checkout another branch. To retrieve the content of the stash, go back to the original branch and do a ‘git stash pop’
 
Then just change the branch to where you need to be working on.
 
=== Global .gitignore file ===
 
If you are sick and tired to add the .gitignore file every time in each new workspace, you can create a global ignore file. This drawback is that this is global for all projects, not just VDF projects. This only goes up if you use GIT also for other files where you do want to track some of these files.
 
In your user data directory you find your settings in a file called ‘.gitconfig’. Create another file in this directory with the name ‘.gitignore_global’, then update the .gitconfig file to add the excludes file reference as follows;
 
<nowiki>
  ...
[core]
excludesfile = c:/Users/Marco/.gitignore_global
  ...
</nowiki>
 
You can also add this using the command interface and the command
 
<code> git config --global core.excludesfile ~/.gitignore_global </code>
 
''If you are trying to rename eg .gitignore to .gitignore_global windows will bark at you as it sees the file as no name, only extension. If you however rename to .gitignore_global. (with an extra . at the end) it will bypass the validation and rename the file properly.''
 
=== Setup a different merge and diff tool ===
 
You can select almost any merge or diff tool.
 
However the 3 way merge in beyond compare is a version only available in the Pro version. I would focus on getting to know git first.
 
Channing the merge and diff tool, is easiest using a Git Extensions dialog;
 
[[File:UsingGitforVdfDev_image033.png]]
 
[[File:UsingGitforVdfDev_image034.png]]
 
After this setting, eg in file history you can use this;
 
[[File:UsingGitforVdfDev_image035.png]]
 
The panel of the commit changes will not be changed.
 
=== Loose objects warning ===
 
This warning can be really annoying and the check and possible warninig is fired each time that you start Git-gui. To stop the warning, start the Git Bash from your start menu.
 
[[File:UsingGitforVdfDev_image036.png]]
 
Then type the following line and press enter
 
[[File:UsingGitforVdfDev_image037.png]]
<code> git config --global gui.gcwarning false </code>
 
Then close the git bash and the check/warning is gone.
 
=== Committing PRN files, but exclude from viewing diff ===
 
Earlier we suggested to add the PRN file to the list of ignored files. However it could be interesting for line numbers of user reported errors. When you do not exclude the PRN, you might find that expecially a larger file with slow down the show difference when clicked by accident.
 
One trick you can do, is to tell git that a .prn file is a binary file. In that case it will not show any differences, just that they differ. This way you can stage and check in the file, and this retrieve later when required.
 
Create in your work directory a file with the name ‘.gitattributes’ and content ‘*.prn binary’.
 
=== Renaming of a remote ===
 
If you want to rename the alias of a remote you can issue the following command
 
<code> git remote rename <currentName> <newName> </code>
 
=== Tagging ===
 
You can like most Version control tools, tag specific points in history. Generaly this is used to mark release points (v1.0 etc).
 
To create an annotated tag (so all information is stored), use the following command:
 
<code> git tag –a <tagName> -m <tagMessage> </code>
 
''If you forgot to place the tag and done some work already after, you can still tag that point in time. Have a look at Tagging  on [http://git-scm.com/book/en/Git-Basics-Tagging]
''
=== Removing a Recent Repository from git gui start screen ===
 
When git gui is started from a directory that does not contain a repository, it will show create/clone/open options as well as 'Open Recent Repositories'.
These are loaded from the global .gitconfig file.
 
In my case this is on windows 7 and logged in as marcok; C:\Users\marcok\.gitconfig
You can remove the recentrepo entries that you no longer wish to have in this list.
 
Rather than directly changing the text file you can also use the git bash line:
 
<code>git config --global --unset gui.recentrepo "C:/work/VisualLMS"</code>
 
== Further reading or reference material ==
 
{|
|Git reference; an easy to read quick reference. Although it focuses on the commands (using command line), it makes the dialogs in Git Gui easy to understand what the options mean.
|http://gitref.org/index.html
|-
|A beginner tutorial, most of the content is covered in this white page.
|http://matthew-brett.github.com/pydagogue/git_gui_windows.html
|-
|Pro Git book
|http://git-scm.com/book
|-
|DataAccess Blog: Configuring Source Control for Visual DataFlex
|http://support.dataaccess.com/Forums/entry.php?116-Configuring-Source-Control-for-Visual-DataFlex
|-
|DataAccess Blog: Source Control and Visual DataFlex 101: The Basics
|http://support.dataaccess.com/Forums/entry.php?117-Source-Control-and-Visual-DataFlex-102-Multi-Developer-Use
|-
|DataAccess Blog: Source Control and Visual DataFlex 102: Multi-Developer Use
|http://support.dataaccess.com/Forums/entry.php?92-Source-Control-and-Visual-DataFlex-101-The-Basics
|}
 
== Third party Git utilities ==
 
* [https://www.syntevo.com/smartgit/ SmartGit]
* [https://github.com/nvie/gitflow Gitflow]
* [https://gitforwindows.org/ Git for Windows]
 
----
 
If you like this article, find issues or need more explanation on any of this, please send me an email.
My email is m dot kuipers at internode dot on dot net
 
[[Category:How To]]
[[Category:Tutorials]]

Navigation menu