As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
Replacing local changes
- checkout - in Subversion, this is essentially the same as a git clone. In git, this can be used to bring down the copy of a code file in a repository, overwriting the local copy. Code:
git checkout -- <file>for all files
git checkout *for all files
- This is not the same as data step merging.
Merging refers to resolution when multiple users (or the same user in multiple branches) bring changes back to the same base commit. For example, this may happen if you attempt to push commits without having updated your local copy of code.
In some cases, more advanced resolution techniques may be needed. For example, if you see the following:
error: your local changes to the following files would be overwritten by merge: <list of files> please, commit your changes or stash them before you can merge aborting
One option is to stash your changes. Essentially, this pushes your local changes onto a stash stack, so you can pull from the remote repository as if you hadn't made the changes. Then you can pop the stack to bring your changes back. Code:
git stash save --keep-index
- (perform pull from remote, etc.)
git stash apply(or use methods for specifying a stash or converting a stash into a branch)
You can also drop the stash if you don't want to save the changes.
git stash drop
The default/standard name used to identify your remote repository is origin. You may recognize this from running commands such as
git push origin master.
However, you can specify any name you want to identify the remote. If you run
git remote, you can see the name of any remote(s) currently setup.
Best practice in software development involves incorporating code review into the development process. Team members will review each others' commits and comment and ask questions based on what they see. Benefits include:
- better conforming to your organization's coding standards
- having multiple sets of eyes can catch things like bugs or unexpected use cases
- team bonding and learning from each others' experiences
- oversight of those with domain knowledge
While this can be done in a team meeting setting, it can also be done individually through software tools. Code review software can be integrated with version control and issue tracking software, which can enable linking from commit messages to the relevant issue(s) and/or code review discussion.