Skip to content

Script Documentation

Victoria Brunner edited this page Apr 1, 2023 · 16 revisions

mkclone

Description

Automatically creates a git clone in desired directory or directory path. Also automatically opens up the folder if you have VSCode or Nova as default text editor for Git. Note: must be used in a directory you want to add the clone in, and that directory cannot itself have a git repo.

Usages

  • mkclone <directory> <remote_repo_url>
  • mkclone your/dir/path/ <remote_repo_url>

mkgit

Description

Automatically creates an empty local git repo when creating a new local project directory. Also automatically opens up the folder if you have VSCode or Nova as default text editor for Git.

Usages

  • mkgit <new_directory_name> if already in directory of choice
  • mkgit your/dir/path/<new_directory_name> otherwise

propergitfetch

Description

Performs git fetch process on a specified branch in specified repo. Great for a local repo that have connections to multiple remote repos. (Yes, all you need to do is type this one word in your terminal.)

Usages

  • propergitfetch

Important

Must be used within a git repo.

propergitpull

Description

Performs git pull process on a specified branch in specified repo. Great for a local repo that have connections to multiple remote repos. (Yes, all you need to do is type this one word in your terminal.)

Usages

  • propergitpull

Important

Must be used within a git repo.

quickpull

Description

Performs git pull process on a specified branch, assuming it is in origin repo, and it is a remote-tracking branch. (Yes, all you need to do is type this one word in your terminal.)

Usages

  • quickpull

Important

Must be used within a git repo. Branch must also have been established as a remote-tracking branch.

qreb

Description

Automates interactive rebasing of a branch of your choice onto main branch.

Usages

  • qreb

Important Must be used within a git repo.

mkbare

Description

Automates process of creating a new local bare repository from a local project folder. Gives instructions for configuration where needed.

Usages

  • mkbare <new_folder_name_or_path>

Important

  • Can technically use this command anywhere, but probably best practice to use the command in the project folder where you want to create the bare repository folder. The project folder itself becomes the corktree, and is the parent directory to the bare repository.
  • You will need to take note of last instruction the command gives you before restarting the terminal or computer to finalize configuration of the bare repository.

bareclone

Description

Automates process of creating a local bare repository from cloning another local or remote repository.

Usages

  • bare clone <new_folder_name_or_path> <existing_folder_name_or_path>

Important

  • Can be used anywhere in the filesystem that you want to create your bare repo in
  • The second argument can be the name or path of a folder with a Git repo on your local machine, or a remote Git repo on a service such as GitHub, BitBucket, GitLab, etc.

localclone

Description

Automates process of cloning a local project folder containing a Git repo, such that the original repo is now the origin remote repo for the cloned project folder.

Usages

  • localclone <new_folder_name_or_path> <original_folder_name_or_path>

Important

  • Can use this anywhere in the filesystem.

openrepo

Description

Opens up an existing repo on local machine at a particular branch. If specified branch does not exist, the branch is created. Right now supports automatic opening only for VSCode and Nova editors. Otherwise just switches repo to another branch.

Usages

  • openrepo <existing_repo_name_or_path> <branch_name>

Important

  • Can use this command in current repo or anywhere else.

viewbranches

Description

Lists all connected remote repos, local branches, and pulled remote branches for a specified local repo. Breaks up all branches into those that are merged and unmerged. Also allows user to see which type of branch they are viewing on the local machine when they git checkout or git switch.

Usages

  • viewbranches <folder_name_or_path>

Important

  • Can use this command in current repo or anywhere else.

Clone this wiki locally