It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,050 views 1 16
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