Skip to content

loatheb/git-clone-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

git-clone-hook

Automaticlly change directory to the folder after git clone

install

curl https://raw.githubusercontent.com/loatheb/git-clone-hook/master/index.sh | bash

thanks

Thanks how-to-cd-automatically-after-git-clone for giving me inspiration.

It's really hard for me to command cd somewhere everytime after git clone.So I want to find a way to do it automatically.

The question above have many solutions, but they all need I to add them in ~/.zshrc or ~/.bashrc by myself.So I write this simple script to detect and write the main function whenever you use bash or zsh.

technical details

some commands are use

  1. basename

it will delete any prefix up to the last slash ('/') character and return the result.

  1. mktemp

it will creates a temporary file or directory.

  1. tee

it reads standard input and writes it to both standard output and one or more files, effectively duplicating its input.

About

git clone hook for auto changing directory.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages