input license here

USING TORTOISEGIT IN PROJECT MANAGEMENT

To be able to manage projects with many parallel developers, it is always necessary to have an indispensable auxiliary tool, which is Git. This article will introduce Git and Git's GUI client tool, specifically TortoiseGit, and the author will also share some experiences in the process of using this tool.


1. Something about Git and TortoiseGit



  • What do you already know about Git?


Git (Distributed Version Control System) is a Distributed Version Control System, born in 2005, so its age is quite young compared to other predecessor SCMs.


You are viewing: What is Tortoisegit?


However, nowadays, using Git to manage source code has become extremely popular. According to a 2018 survey by Stack Overflow, nearly 90% of developers were using Git for their projects at the time.



Survey on the rate of using Git in projects (2018)


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



Some salient features of Git:



  • Easy to understand, easy to operate

  • Lightweight but very powerful

  • Compared to other SCM tools like Subversion, CVS, Perforce and ClearCase, Git has many outstanding features such as:



      • Easy and convenient branch management

      • There is a convenient stage area where you can review everything before committing

      • Especially the distributed nature of Git, we can arbitrarily apply any workflow when using it in the project.






Besides, Git also has some weaknesses but not significant, in which the biggest weakness is that Git is not suitable for managing large binary files.


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK





TortoiseGit is a Windows Shell Interface for Git, developed from the famous TortoiseSVN. TortoiseGit's strengths are many, while there is only one weakness, which is only running on Windows 😀


Git CMS is lightweight and powerful, but it is distributed as a CLI, so it is still a difficult tool to reach for those who are not used to working by typing commands through the console. Of course, working through the GUI is always more fun and friendly and saves you from having to remember more complicated commands and params.


List of Git GUI tools:


Once installed, TortoiseGit will be integrated into the context menu with many features as shown below:


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




You can refer to the photo gallery here to see the massiveness of TortoiseGit.


2. Two classic workflows


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK?




Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



In many projects, customers often use Git to manage the entire source code and documentation. Typically, two different workflows are used for the source code repo and the document repo.


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



Workflow for source code


Workflow for source code needs to meet the following requirements:



  • The team can freely work according to the workflow they want without affecting the client side. The client side also only knows about the only deliverables branch of the team.

  • Members of the team only see the deliverables handover branch, there will be no commit and mistaken push to the customer's branch.

  • Only BSE standing in the middle responsible for delivering deliverables can see both sides. BSE is also the one who will take the necessary changes from the client and bring them back to the team in case the client develops in parallel with the team.



Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



Workflow for docs


Repo documents often contain many binary files (not plain text), especially Excel files, so there are some limitations such as:



  • Comparing item diff between versions is not as easy as source code

  • Because it is difficult to compare diff, dealing with conflicts will take time and effort

  • Complex workflows (with many branches and merge flows) will generate a lot of revision history while Git itself is not inherently suitable for binary file management.


Therefore, the workflow design for the document repo would have to be simplified as follows:



  • The client and the team both work on their only branch

  • Only one-way merge from client branch to team branch by BSE. Delivery of deliverables will be by using compare and item synchronization

  • All mems have permission to commit push to the team branch.



Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




  • Bringing 2 historical repos into a common thread


Usually when the customer already has the repo docs available and the team pulls it back, BSE just needs to create a branch for internal use of the team. Then the revision graph will have the following form:


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



But sometimes the team also has a repo available for the same project while the client side also has its own repo, the management will become difficult (can't compare 2 repos with different history, switching back and forth is also time consuming. space). Therefore, the solution now is to create a common revision of both repos and things will be easier from that point on.


Here is an example showing 2 branches of 2 repos running in parallel during the project life.



Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



Note: When performing the merge, there will be a warning that the 2 repos do not have the same history, now I choose the option force merge.


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




  • Get the content changed between 2 revisions


Usually BSE does not update changes from the client side often, sometimes a day or a few days until the customer reports an update. At such times, the guest has committed quite a few times, so to communicate the customer's changes to the team, the most convenient way is to use the feature. compare 2 revisions by TortoiseGit.


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



As shown in the image above, the black graph is the branch from the client's repo, and the red is the team branch on the Cowell repo. It can be seen that since revision `bef5684` the guest has committed 3 more times. We can select 2 revisions as above and use the feature compare revisions to see the change.


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



After Double click on each item, the diff view of that item will be displayed. Or we can copy the entire list as text to share with the team.


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




  • Check changes of Excel documents


Another advantage of TortoiseGit is that it has pre-set scripts that support comparing popular files such as Word, Excel, Power Point.. so we can see the diff of these documents as easily as the diff of the source. code.


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



Below is an Excel diff window with red cells being the changed cells. We can quickly locate and change content without the help of the client.


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




Even if the client side has carefully marked the changes in color, the next time the client has to change the color, they still have to revert the place back to the normal color. Therefore, this method is not useful at all when comparing files in two revisions that are far apart.


This feature is especially useful because BSE can directly hand over the diff file to the member in charge of the feature, which automatically confirms the changed locations, saving time checking changes and explaining.


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




  • GSE can directly assign the diff file to the member in charge of Git log


With the docs workflow, there's no such thing as merging the team branch into the customer's branch or moving the team branch to the customer's repo. Therefore, BSE will have to move files through the client branch according to the following process:


Step 1: Stand at the branch of the team, go to the working dir and copy the files to be handed over to a temporary directory


Step 2: Switch to the client branch, copy those files to the appropriate location


Step 3: Commit and push to the client's repo


Some problems often occur at step 1 and 2 :



  • The number of files is large, the operation is also quite time-consuming, especially if the files are located in many different folders

  • During the process of copying and checking, the file was accidentally changed unexpectedly


Solution :


Always put the folder on the team branch with the same path as the folder on the guest branch.


Use the revert feature on TortoiseGit's compare window to copy files. In this way, documents will be copied quickly and accurately across the customer's branch.


Illustrated as shown below:



Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



Step 1: Switch to client branch (above is master), then compare working tree changes and team branch (above is cw_master)


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK?



Step 2: Find the file to be transferred to the client, select Revert to revision xxx from the context menu


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK




Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



Step 3: When the revert is done (above is reverting from the delete state, ie creating a new one on the client branch) there will be a popup like above



Step 4: Close the dialog, refresh History. When we check Working tree changes, we will see that the team file has been copied to. At this point, we can commit and push to the guest repo.


Reference: What will be skinny? The real meaning makes people hot


Hot: WHAT IS CLOCKWORK



Conclusion


Using the command line is cool and fast, but it's not suitable for all situations. A convenient GUI client tool like TortoiseGit will make it easier for you to work as well as simplify document and source code management. Hopefully the information about Tortoise Git in this article will help improve your project to run smoother and faster.


Nguyen Quang Yen – CO-WELL Asia


See more articles about CO-WELL Asia fanpage technology


See also: What is SPARQL?


Related Posts
Diệp Quân
Nguyen Manh Cuong is the author and founder of the vmwareplayerfree blog. With over 14 years of experience in Online Marketing, he now runs a number of successful websites, and occasionally shares his experience & knowledge on this blog.
SHARE

Related Posts

Subscribe to get free updates

Post a Comment

Sticky