Skip to end of banner
Go to start of banner

Git

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

What is Git?

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Atlassian Git Tutorial

How is it used?

I have Git up and running within my team. Git is a way to chronologically save stuff over time, so you don’t lose work which hasn’t been saved as a new copy of the old program. A repository is supposed to be an easy to maneuver location where code (Ladder logic) and artifacts (E.G: HMI files) are stored.

The following is a small tutorial on how to use git, as well as an advanced in depth way of working with Rockwell tools and Git at the same time. You can make a personal repo just for yourself, or a combined repo for yourself as well as your teammates in a shared location. Both add value to my workflow personally.
We have the following code storage structure in our team:
-> Remote directory on a shared drive
-> Local directory per team-member

What do I need?

How do I configure it?

OK, so here is what I did on the config side:

  1. Install Git on your machine.

  2. Install Git Extenstions on your machine.

  3. If you want the capability of comparing, make sure you have Logix Designer Compare Tool installed on your machine as well.

  4. Make an empty directory in a local location (i.e. somewhere on your computer), then right click in windows explorer, and click Create GitExt new repository... then select Personal Rep then Create.

  5. Once you have this empty repository, right click in windows explorer, and then GitExt Open repository.

  6. In GitExt, click Repository on the menu bar then Edit .gitignore.

  7. In the Edit .gitignore pop-up window paste the following:
    #Ignore useless packages created by RSLogix.
    .bakacd
    *.acd.recovery
    *.sem
    *.wrk
    This will stop the temporary files from being included in the git and will declutter your system.

  8. Hit save.

  9. Now go to Tools > Settings > Git > Config. Enter your username and email. Hit save.

  10. Install Logix Designer Compare Tool

  11. Open the Setting dialog box in Git Extensions by clicking Tools > Settings in the menu bar.

  12. In the navigation pane select Git then Config.

  13. In the Config window:
    • You’ll find an option to fill in your username, email, etc.
    • In MergeTool: Type in a name for the Merge Tool, something like RSLogixMerge.
    • The default Path to Mergetool is C:/Program Files (x86)/Rockwell Software/Logix Designer Tools/Logix Designer Compare Tool/RSLCompare.exe
    • The Mergetool command is "C:/Program Files (x86)/Rockwell Software/Logix Designer Tools/Logix Designer Compare Tool/RSLCompare.exe" -m "$LOCAL" "$REMOTE" -PM FastestCompare
    • In Difftool type in something like RSLogixDiff, which defines a new difftool in git.
    • My path to difftool was: C:/Program Files (x86)/Rockwell Software/Logix Designer Tools/Logix Designer Compare Tool/RSLCompare.exe
    • My difftool command was: "C:/Program Files (x86)/Rockwell Software/Logix Designer Tools/Logix Designer Compare Tool/RSLCompare.exe" "$LOCAL" "$REMOTE" -PM FastestCompare
    • Line endings: Not Set.

  14. Hit apply, and you are set! Now, if you commit an ACD file, make a change, save it, and then commit another file.

Where are the remote repositories?

The remote repositories are on bitbucket.org.

Global Interlock System git

Logic Files: http://bitbucket.org/dkist/gis.git

HMI Files: http://bitbucket.org/dkist/TIM.git


  • No labels