Wolfram Language Paclet Repository (Under Development)

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • External Interfaces & Connections
    • Geographic Data & Computation
    • Graphs & Networks
    • Images
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Sound & Video
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
    • Using Paclets
    • Creating Paclets
    • New Definition Notebook
    • Random Paclet
    • Alphabetical List

GitLink

Guides

  • GitInterfaces
  • GitLink
  • GitReferenceOperations
  • LowLevelGitOperations

Symbols

  • GitAdd
  • GitAddRemote
  • GitAheadBehind
  • GitBranchQ
  • GitCheckoutReference
  • GitClone
  • GitClose
  • GitCommit
  • GitCommitQ
  • GitCreateBranch
  • GitCreateTag
  • GitDeleteBranch
  • GitDeleteRemote
  • GitDeleteTag
  • GitExpandTree
  • GitFetch
  • GitInit
  • GitMergeBase
  • GitMerge
  • GitMoveBranch
  • GitObject
  • GitOpen
  • GitProperties
  • GitPull
  • GitRange
  • GitReadBlob
  • GitRemoteQ
  • GitRepo
  • GitRepoQ
  • GitRepos
  • GitReset
  • GitSetUpstreamBranch
  • GitSHA
  • GitSignature
  • GitStatus
  • GitType
  • GitUpstreamBranch
  • GitWriteBlob
  • GitWriteTree
  • ToGitObject
Wolfram`GitLink`
GitCheckoutReference
​
GitCheckoutReference
[repo,ref]
sets the
repo
's HEAD to point to
ref
and checks out
ref
into the working directory.
​
Details
▪
When it succeeds,
GitCheckoutReference
will return a
GitObject
corresponding to the commit now being pointed to by HEAD.
▪
ref
can be a string representing a branch, tag, or SHA, or it can be a
GitObject
. If
ref
is not a branch name, then the operation will leave
repo
in a detached head state.
▪
GitCheckoutReference
will only succeed if it can update the working tree and index of
repo
without introducing any conflicts. If the action of checking out
ref
would change any files that are changed in the working tree or index,
GitCheckoutReference
will leave
repo
unchanged and return
$Failed
.
▪
GitCheckoutReference
will return
$Failed
if
repo
has no working tree or index.
▪
The following options can be given:
"Create"
False
if true, then create the named branch at the current position and check it out
"Force"
False
whether to completely override any changes in the working tree and index
"UpstreamBranch"
Automatic
name of the branch to set as an upstream branch
"UpstreamRemote"
Automatic
which remote to check to attempt to infer an upstream branch
▪
If
ref
doesn't exist as a local branch, but it does exist as a remote branch on a remote in
repo
, then
GitCheckoutReference
will create a local branch with the remote branch as an upstream branch.
▪
If
ref
doesn't exist as a local or remote branch, then
GitCheckoutReference
will return
Missing
["NoReference"]
.
SeeAlso
GitResetRepo
 
▪
GitCheckoutFiles
 
▪
GitStatus
""

Powered by the Wolfram Cloud More about Wolfram Technology

© 2022 Wolfram Research, Inc. All rights reserved. Terms of Use Privacy Contact Us