Make Your Changes Public
When you edit files in your workspace, you're working within your local repository, which means that only you can see them. To share your private changes with your team, you'll need to push them to a shared project repository (the remote repo).
When you make changes in your workspace, an yellow dot appears next to the branch name in the header to let you know that you have uncommitted changes:
Description of the illustration git-header-badge.png
-
The first step you must perform is a commit. When you make a commit, you're basically grouping together the files in your local branch that you eventually want to move to the remote branch. You also provide a description of the changes you're making in the commit, which can be very helpful later if you need to track down which files were changed.
For example, suppose you added a new dynamic layout to include a field. When you committed the changes, you added a commit message describing the update, "Added new layout X for field Y". You then added a rule for the new layout, using the commit message "Added rule Z for layout X". By reviewing the history for the repository (using the Git History tab at the bottom of the Designer), you can easily see what files were changed and the reasons for changing them:
Description of the illustration githistory.png -
The second step is push, which synchronizes all the files you have committed thus far (since the last push) with the remote branch. If you have edited some files but haven't committed them, you'll be prompted to commit before you can push.
Note:
You can use the Publish action in the header if you want to commit, push, and merge the remote branch into themain
branch in one operation. See Deploy a Visual Application. Don't use Publish if you're not ready to merge the remote branch into the main
branch.
Commit Your Changes In the Local Branch
You use the Commit option to save changes that you've made in the local branch of your workspace. A commit takes a snapshot of your workspace, so you always have a "safe" version of your changes at that point in time.
Ideally, commit your changes as often as you can. You'll be prompted to commit changes in your local branch when you try to pull commits from a remote branch, switch to a new branch in your workspace, rename a branch, share your changes, even upgrade your application.
To commit changes in your workspace:
Push Your Changes to the Remote Branch
Use the Push option to move changes you've committed from the local branch in your workspace to the remote branch, thus making your changes visible to team members. You'll need to explicitly commit your changes before you can push them to a remote branch.
Note:
Before you commit and push your changes, you should update the source files in your workspace by pulling the most recent versions from the repository. If the file versions in the remote branch are newer than the versions in your workspace, you’ll see a status message when attempting to push your changes that the push was rejected and that you should pull the most recent versions from the repository.To push your commits from the local branch in your workspace to the remote branch: