You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.
Right now, adding this to bash_profile-mods.bash seems to be the best I've come up with
function gitclonecd() {
if [[ $1 =~ /(.*)\.git$ ]]; then
echo ${BASH_REMATCH[1]};
git clone $1;
cd ${BASH_REMATCH[1]};
else
echo "Could not derive a valid directory name from repository.";
fi;
}
This allows
gitclonecd [email protected]:ironcodestudio/ironcode-git-enhancements.git
# which clones the repo and then does a cd into it
I've been unable to make this a Git alias (and have made it a bash alias) because I am unable to change the working directory from within the git alias.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Every time I do
git clone
, I follow it withcd
to move into the project directory.e.g.
It would be nice to combine these.
Hat Tip to @michealengland
The text was updated successfully, but these errors were encountered: