SYNOPSIS
Nuggit ops includes common nuggit checkout, rebase, merge, and pull operations. See man pages for those commands for details.
Sample Commands
Commands can be executed as "ngt ,,,", "nuggit ...", or "nuggit_ops.pl ..."
- checkout -b $branchName
-
Create a new branch with the given name in the root repository and all submodules.
- checkout --safe [$branch]
-
Checkout the given $branch at the root repository and all submodules, providing that doing so does not affect the currently checked out revision. If $branch is omitted, or no action will be taken unless a given submodule is currently in a detached HEAD state. This command will resolve any detached HEADs that it detects if a branch exists that matches the current revision.
Note: The safe operation is not valid in conjunction with a filename, Tag or SHA commit reference. Behavior in these conditions is undefined and error detection is not guaranteed.
- checkout $branch_SHA_or_tag
-
Checkout the given branch, SHA commit, or tag at the root repository. Nuggit will follow the committed references for all nested submodules. At the conclusion of the operation, Nuggit will attempt to resolve any detached HEADs and will warn if it unable to do so. Detached HEADs can occur if a submodule reference was not committed, or if the requested input is a SHA or tag that does not correspond to the HEAD of any known branches.
- checkout $file_or_directory
-
Perform a git checkout of a given file or directory. This command is used to revert changes to the workspace.
Note: If a directory is specified and contains submodules, the submodules will not be affected by this command.
- merge $branch
-
Merge given branch into current checkout.
TIP: To merge a remote branch, run "ngt fetch && ngt merge origin/$branch"
- pull
-
Pull changes from remote into current working branch.
- rebase $branch
-
WARNING: Rebase support is considered experimental and has not been fully tested at this time.
checkout_create_branch
Nuggit equivalent to "git checkout -b $branch".
This function should be called from the root repository.