MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

Source Control > View Details. The Git information field indicates whether your
committed local changes are ahead of, behind, or coincident with the remote tracking
branch. When you see the message Behind, you need to merge in changes from the
repository to your local branch.


For example, if you are on the master branch, get all changes from the master branch in
the remote repository.


(^1) Right-click in the Current Folder browser and select Source Control > Fetch
(^2) Right-click in the Current Folder browser and select Source Control > Branches.
(^3) In the Branches dialog box, select origin/master in the Branches list.
(^4) Click Merge. The origin branch changes merge into the master branch in your
sandbox.
If you right-click the Current Folder browser and select Source Control > View Details,
the Git information field indicates Coincident with /origin/master. You can now
view the changes that you fetched and merged from the remote repository in your local
sandbox.
Use Git Stashes
Store uncommitted changes for later use by creating a Git stash. Use stashes to:



  • Store modified files without committing them.

  • Move changes easily to a new branch.

  • Browse and examine the changes within a stash.


To create and manage stashes, in the Current Folder browser, right-click the white space
in a folder managed by Git and select Source Control > Stashes.


In the Stashes dialog box:



  • To create a stash containing your currently modified files, click New Stash.

  • To view modified files in a stash, select the stash under Available Stashes. Right-click
    modified files to view changes or save a copy.

  • To apply the stash to your current branch and then delete the stash, click Pop.

  • To apply the stash and keep it, click Apply.

  • To delete the stash, click Drop.


Pull, Push and Fetch Files with Git
Free download pdf