This session introduces SAS programmers to Git as a practical, modern way to manage, collaborate on, and version SAS code using familiar SAS tools and workflows.
What you'll learn:
Why Git is the industry-standard version control system and how it brings order, traceability, and collaboration to SAS code projects.
Core Git concepts—such as repositories, commits, branches, clones, and pull requests—explained in plain language and SAS‑centric terms.
How SAS tools like SAS Studio, SAS Enterprise Guide, and the SAS language itself integrate with Git for everyday development tasks.
Practical workflow guidance, including connecting to GitHub or GitLab, choosing HTTPS vs. SSH authentication, and organizing SAS projects for reuse and teamwork.
Watch On Demand
Note: This is an updated version of a webinar that we last delivered in 2022. For reference, you can see the previous Q&A from that session.
See also this new workshop: Versioning with SAS Studio Git Integration
Questions and Answers
Do you have any recommendation for a compatible documentation tool?
Answer: Chris said he didn’t have a single specific recommendation, but noted that tools like Doxygen are sometimes used to generate documentation from comments embedded directly in code. He mentioned that some SAS users have successfully used these tools and even written conference papers about them. He also highlighted structured Git commit messages as an important documentation practice, pointing to the SAS VS Code extension repository on GitHub as an example of using standardized commit message conventions to generate meaningful change logs.
If you use VS Code with the SAS extension to access and run programs stored on a Viya server, can you use VS Code’s Git integration to commit, diff, pull, and push remote files without syncing them locally?
Answer: Chris said no. Git actions must be co‑located with the file system where the code lives. VS Code’s Git integration works only with files on the local machine where VS Code is running. It cannot directly operate on files stored in a remote SAS Viya file system. To use Git with VS Code, you must clone the repository locally, make changes there, and then sync those changes back through Git.
Does GitLab recognize SAS programs (syntax highlighting), or does it treat them as plain text?
Answer: Chris said that GitHub and GitLab do recognize .sas files and provides at least basic syntax highlighting. While the highlighting and syntax-awareness is not as rich as SAS Studio, Enterprise Guide, or the SAS VS Code extension, it is more than plain text. He also noted that SAS uses both GitHub and GitLab internally.
Can you use Git integration in SAS Studio across multiple SAS environments (dev, test, prod), or do you need to manage that externally?
Answer: Chris said yes, it is possible, depending on how you design your workflow. Git can act as the common link between environments. For example, you might use different branches (dev/test/prod) or clone the same repository into different SAS environments. Git allows changes made in one environment to be committed and then synchronized into another without relying on shared file systems.
Traditionally we use Notepad++ to compare versions of SAS files manually. What are the benefits of Git diff in SAS Studio or Enterprise Guide?
Answer: Chris explained that the built‑in Git diff tools in SAS Studio and Enterprise Guide are functional but basic—they show added, removed, and changed lines. For more robust comparison, especially across directories, he personally prefers WinMerge, a free tool that can compare entire folders and files and even help synchronize changes between versions.
What level of encryption is used to secure credentials stored in SAS Environment Manager?
Answer:
In SAS Viya → Environment Manager → My Credentials, stored credentials are encrypted at rest using AES‑128 (Advanced Encryption Standard with 128‑bit keys). See the SAS Viya Platform Documentation for details.
Is it common practice to save SAS job logs in Git after a program completes?
Answer: Chris said it is not common practice, but it is technically possible. He cautioned that storing logs can cause repositories to grow quickly, since Git stores full history and pulls it on every clone. He also noted that Git works best with text-based files (code, logs, config files) and is less well‑suited for large or binary files such as SAS data sets, where Git cannot easily show meaningful differences.
Does Git only work with SAS Studio, or can it also be used with SAS Enterprise Guide (EG)?
Answer:
Git integration is built directly into SAS Studio in SAS Viya. SAS Enterprise Guide also provides integration with Git. Note that with SAS Enterprise Guide, you need to first install the Git client and then create your Git profile.
Does Git work with Base SAS?
Answer:
Yes. Git is independent of Base SAS. You can use Git with Base SAS programs (in Windows or PC SAS, or any SAS you have installed) as long as the code is stored in a Git‑managed directory. Git operations (clone, commit, pull, etc.) are handled outside of SAS or through tools like SAS Studio, VS Code, or the Git CLI. You can also use the GIT* functions within your SAS programs. Using Git does not require any additional SAS products or license.
Can I use Git with LSAF (Life Sciences Analytics Framework)?
Answer:
LSAF environments typically restrict external tools and filesystem access. Git usage depends on site‑specific policies and compliance rules, so this should be validated with your LSAF administrator. While LSAF does not offer direct Git integration, it does has a well-designed workflow for collaboration and versioning.
We plan to start with a mounted shared drive. Are there special considerations compared to a local Git folder?
Answer:
Yes. Git works best with local working copies. Shared drives can cause file‑locking, performance issues, and merge conflicts if multiple users write to the same working directory. Best practice is for each user to have their own local clone and collaborate through a shared remote repository.
Should you create a local repository first or a remote repository first?
Answer:
Best practice is to create the remote repository first, then clone it locally. This ensures a consistent starting point and simplifies collaboration. (During the webinar demo you saw the opposite workflow, which can work as well!)
Why isn’t my GitLab feature branch visible in SAS Studio even though it exists?
Answer:
Usually because the local repository hasn’t fetched the remote branch yet, or permissions prevent visibility. A fetch (not just pull) is required to see new remote branches.
How do we store all SAS programs in Git in a SAS 9.4 environment?
Answer:
Store .sas programs in a Git‑managed directory (local or network). Use SAS Enterprise Guide or external Git tools. Avoid committing auto‑generated or environment‑specific files. (The .gitignore file -- discussed in this video -- can be used to tell Git which files to ignore/skip tracking.)
Can I connect a personal Git account to my company's SAS environment?
Answer:
This depends on company security and IP policies (but probably NOT). Many organizations require company‑managed Git accounts and repositories. Always check corporate guidelines before using personal accounts.
How secure is code stored on GitHub or GitLab?
Answer:
Private repositories are access‑controlled and not publicly searchable. Public repositories are visible to anyone. Security depends on repository visibility, access controls, and company policies—not Git itself. If you're using a self-hosted Git environment or Enterprise version of GitHub or GitLab or another commercial service, then access and security is controlled by the provider and your administrators.
What are best practices for version control of non‑code files like datasets or RTF outputs?
Answer:
Generally, avoid storing large binary files in Git. Use Git for scripts and configuration files, and manage datasets via shared storage, versioned exports, or artifact repositories. (RTF files are text but can be large with binary "blobs" embedded -- not ideal for Git.)
Is there an equivalent to SVN keyword substitution in Git?
Answer:
Git does not support built‑in keyword substitution. Similar metadata is available through Git commands or CI pipelines, but embedding it directly in files is not standard practice.
Do you have an example of config or control files stored in Git?
Answer:
Common examples include parameter files (text or CSV), YAML/JSON configs, macro libraries, environment variables (without secrets), and README documentation describing project structure.
Are there plans to bring SAS Viya Copilot into SAS Studio?
Answer:
Currently, SAS Viya Copilot is used through supported IDEs like VS Code. But new Copilot integrations are being introduced all of the time, so we look forward to having coding assistance AI in other SAS tools as well. (Look for more announcements around SAS Innovate 2026!)
Is there a Git workflow for SAS Visual Analytics?
Answer:
Git works well for VA artifacts that are file‑based (JSON, exported reports), but in‑platform objects are typically managed through SAS content lifecycle tools rather than Git alone. There is not a built-in workflow in SAS tools for this right now.
... View more