npm install node-git-current-branch --save Usage constgetCurrentBranchName=require('node-git-current-branch');getCurrentBranchName();// branch name or false API getCurrentBranchName([ path ]); Returns branch name or false Props path
git = qisrc.git.Git(foo_proj.path) git.checkout("HEAD~1")assertnotgit.get_current_branch() qisrc_action("checkout","master","--force")assertgit.get_current_branch() =="master" 开发者ID:Mhalla,项目名称:qibuild,代码行数:12,代码来源:test_qisrc_checkout.py 示例2: test_get_current_...
git remote set-head <name> (-a | -d | <branch>) // git remote set-branches [--add] <name> <branch>... git remote set-url [--push] <name> <newurl> [<oldurl>] git remote set-url --add [--push] <name> <newurl> git remote set-url --delete [--push] <name> <url> ...
$ npm install --save git-branchUsageconst branch = require('git-branch');Optionally pass the cwd (current working directory) as the first argument.Promisebranch('some/path') .then(name => console.log('Branch:', name)) //=> 'Branch: master' .catch(console.error);...
gitRepo.RootPath.Combine ("Xwt"), gitUrl);varsubmoduleRemote = submodule.GetCurrentRemote (); submodule.Fetch (monitor, submoduleRemote);if(submodule.GetCurrentBranch() != gitBranch) { submodule.CreateBranch (gitBranch, submoduleRemote +"/"+ gitBranch,"refs/remotes/"+ submoduleRemote +"...
Learn more about the Microsoft.TeamFoundation.SourceControl.WebApi.GitUtils.GetFriendlyBranchName in the Microsoft.TeamFoundation.SourceControl.WebApi namespace.
To get the source, you can either just download a zipped copy of the latest master branch or clone the source base with git, like so: XMLCopy $ git clone https://github.com/NuGet/NuGetGallery.git When you’ve done this, you’ll have the entire source base locally. At its root you...
defaultBranch string id string isDisabled boolean 如果存储库处于禁用状态,则为 True。 否则为 False。 isFork boolean 如此 如果存储库创建为分支。 isInMaintenance boolean 如果存储库处于维护状态,则为 True。 否则为 False。 name string parentRepository GitRepositoryRef project TeamProjectReference...
defaultBranch string id string isDisabled boolean 如果存储库处于禁用状态,则为 True。 否则为 False。 isFork boolean 如此 如果存储库创建为分叉。 isInMaintenance boolean 如果存储库处于维护状态,则为 True。 否则为 False。 name string parentRepository GitRepositoryRef project TeamProjectReference...
defaultBranch string id string isDisabled boolean 如果存储库处于禁用状态,则为 True。 否则为 False。 isFork boolean 如此 如果存储库创建为分支。 isInMaintenance boolean 如果存储库处于维护状态,则为 True。 否则为 False。 name string parentRepository GitRepositoryRef project TeamProject...