As per this thread, users or organizations housing code and git repositories on a remote server cannot integrate their revision control into EG.
While accessing git via the command-line works well and gives you more power, it would be nice to see committing and viewing commit history built-in to EG.
I think if EG was built with this in mind it would be great. I reluctantly vote for this because it seems as if I'm asking too much of the developers. Being curious, I created a gitHub repository, and a EG project.
I began editing and saving an EG file, committing my changes to the repository. To do this I copied the .EGP file, changed the resulting file's extention to .ZIP and then, consistently, extracted the zip to the file structure between the saves and commits. I did this so that gitHub software would see files in the EGP file as they are. If you want to take a look. There is some infomration gleaned on changes made from commit to commit, but there is alot of other junk too. Looking at this long enough I guess I would figure out how to write EP Tasks and reports using XML. (I dare not stare too long)
@PhilC, thank you for your comment. I feel this is a reasonable request of the developers, as a good IDE has support for version control - of code, not binary files exclusively.
Thanks for sharing your repository. Sure, one could write XML from scratch, but is there any guarantee that the layout would be consistent across versions of EG? What if I want to import the code to DI Studio, for example? Using pure SAS code ensures usability across systems and SAS software, but .egp files are exclusive to EG.
It's great that we can commit .egp files, but I think it's important to consider good software engineering practice.
I'm a little confused by this request...
EG *does* allow you to work with remote Git repositories. The way one typically works with remote Git repositories is by cloning the repository to their local machine, work out of the local repository, and then push/merge changes back to the remote repository. For example, if you have a GitHub project (or any other remote Git repository) with .sas programs, you can clone it to your local machine, then use EG to open those programs from your local repo, commit changes to them, view history on them, diff them, etc. However, as with cloning, you have to go to an external tool (ex. Git Extensions, GitHub for Windows, SourceTree, etc.) or commandline for pushing/merging your local repo back up to the remote/origin. EG directly integrates basic Git operations (commit, history, blame, diff), but more advanced operations (ex. clone, pull, push, merge, branch, squash, rebase) were intentionally left for other dedicated tools.
Since EG does support working with remote Git repositories, I assume this request is more accurately for "Git integration to work with .sas files accessed through a SAS server"? You want to store .sas files in a Git repo on your SAS server and have your end-users be able to access the .sas files from your workspace server's Files location (ex. SASApp->Files)? Then, be able to commit changes to the .sas files, view their history, etc. through the SAS server? The SAS server does not currently provide any APIs for such source control operations. EG has to have some way to perform operations on the Git repo, but the SAS server doesn't currently provide a way. Even if the SAS server provided APIs, the Git repos on the server would have to be unique to each user -- you wouldn't want multiple people sharing the same working repo.
Please help me understand the request. A specific example/scenario might help.
Note: EG's source control integration is for SAS programs exclusively (not EG project files (.egp), which are binary formats), hence the name "Program History".
Indeed. ( @paulkaefer )
Brainstorming about this a of couple things would be useful
now that I've thought about it more, and because of this last point, I think we might be more sucessful at making a "gitHub" or "SVN" look more like an "Enterprise Guide" than make Enterprise Guide fit inside these popular versioning systems.
@CaseySmith, my original suggestion is just to have built-in git support, as SVN support already exists. Correct, I can run git externally, whether my code is saved on my local machine or on a server. However, it would be easier for some users if one could have a visual git built-in to EG. Like other IDEs (example: Microsoft Visual Studio).
@PhilC: I very much appreciate your discussion. Rather than try and refactor .egp files, I just want a way to commit the raw code. I'd be happy if you can commit both the raw code and the .egp file itself (optionally). But the suggestion is just to have the same general support for git as currently exists for SVN.
Ok, I think I understand now. It sounds like you want more feature-rich Git integration in EG than what is currently provided.
EG (starting in v7.11) does have built-in Git support for *some* basic Git functions, such as commit, diff, blame, history -- things you'd typically do while writing a program. However, EG does not currently support other non-basic Git functions, such as cloning, pulling, pushing, merging, resolving merge conflicts, branching, squashing, rebasing, etc. We intentionally left those more advanced operations to dedicated Git tools for our initial release -- to reduce complexity and avoid re-inventing the wheel. However, that does mean that you can't currently do everything you need to do Git-wise in EG. To use Git in practice with EG, you'd have to use EG in combination with a Git GUI or Git command-line. For example, here is how a SAS programmer might work today:
We have been discussing some ideas on how we could add more complete Git integration in EG, such that a SAS programmer could develop their programs stored in Git without having to leave EG.
Let me know if I don't have that right. And thanks for your suggestion!
Note: EG does not currently have any direct SVN integration. You can use SVN with EG, but there is no direct integration.
@CaseySmith, thanks for the detailed response. Actually, I'd be happy with just basic git integration - and I'm still on EG 7.1, so it sounds like what I am looking for is available in 7.11 and later.
I personally would be fine with just the basics integrated, and more advanced features like merging requiring you to use your external tool. I'm used to the workflow of committing via the command-line anyway, and commit/diff/history are the most common uses by far.
Thanks so much for your discussion. I look forward to using future releases!
@paulkaefer I'm sorry, my memory failed me!... the Program History feature (basic Git integration) was added in 7.1, so you should already have access to it. You should see "Changes", "Commit", and "History" buttons on the contextual toolbar when a program is open in the EG editor.
It is briefly discussed here at the beginning of this blog post by Chris Hemedinger:
And if you want more information on the feature, here is a paper that covers it in detail:
Check It Out! Versioning in SAS® Enterprise Guide®
Glad to hear that it may already meet most of your needs. Would be happy to hear additional feedback you might have when you get a chance to play around with it.
@PhilC, you hit the nail on the head regarding the serious challenges we faced when contemplating full versioning for EG projects and process flows. You can't beat text versioning. Ultimately, we decided adding source control integration for SAS programs (since text-based), was much more practical and what users really wanted.
Dot language is interesting... been reading up on it for the last 30 mins. Thanks for sharing!
@CaseySmith, you're right. But I should have been more clear... that's only local git integration. If my code is stored on a server, rather than my own local machine, this doesn't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.