How do you keep executing an [alias] even though there is an error? Edited

Hi all,

I have created the following alias so we more quickly can setup projects as part of our pipeline.

git config --global alias.setupforktemplate !git remote add old-origin $1 && git lfs fetch --all old-origin && git lfs push --all origin && git lfs pull

What it does it fetches the LFS data from a source repo and re-push the LFS data to a fork from the source repo. The problem with this is that it will certainly produce errors midway. It even says so in the guide "Git LFS files are not copied when a repo is forked"

This error is expected and is not a problem because the remaining part of the alias will resolve the issue. The problem is, when the error is triggered the execution of the alias is halted midway. Is it possible to do something that allows me to continue executing the alias even though an error occurs?

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,242 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you