public GitBranchResponse renameBranch ( File repositoryPath , boolean forceRename , Ref newName ) throws IOException , JavaGitException { CheckUtilities . checkNullArgument ( repositoryPath , "repository path" ) ; CheckUtilities . checkNullArgument ( newName , "new name" ) ; CheckUtilities . validateArgumentRefType ( newName , Ref . RefType . BRANCH , "new name" ) ; IClient client = ClientManager . getInstance ( ) . getPreferredClient ( ) ; IGitBranch gitBranch = client . getGitBranchInstance ( ) ; return gitBranch . renameBranch ( repositoryPath , forceRename , newName ) ; }
Renames the current branch to new branch .