# Running a Nextflow pipeline from a Git repository: Setting defaults

**URL:** https://community.seqera.io/t/running-a-nextflow-pipeline-from-a-git-repository-setting-defaults/507
**Category:** Tips & Tricks
**Tags:** nextflow
**Created:** [February 20, 2024, 3:03pm UTC](https://community.seqera.io/t/running-a-nextflow-pipeline-from-a-git-repository-setting-defaults/507 "2024-02-20T15:03:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mribeirodantas](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mribeirodantas/32/235_2.png) [@mribeirodantas](https://community.seqera.io/u/mribeirodantas)
#### Post date: [February 20, 2024, 3:03pm UTC](https://community.seqera.io/t/running-a-nextflow-pipeline-from-a-git-repository-setting-defaults/507/1 "2024-02-20T15:03:26Z")

</div>

Nextflow pipelines can be run directly from their Git repository URL. It’s as simple as:

```Groovy
nextflow run nextflow-io/hello

```

Under the hood, Nextflow will choose _GitHub_ as Git provider by default (`https://github.com/nextflow-io/hello`, for the example above), but you can set this with the command-line interface option `-hub`. Other options are `gitlab` and `bitbucket`. The command above will download the [GitHub - nextflow-io/hello: Classic hello world script in Nextflow language](https://github.com/nextflow-io/hello) git repository, under the stickied branch (usually `main` or `master`) and run the `main.nf` script at the root of the git project.

But what if my pipeline main script file is not `main.nf`? Or what if I want to download the pipeline code under a branch name other than `master`? And if I want my pipeline to require a Nextflow version that is not older than X.Y.Z? That’s what the `manifest` scope is for. See the snippet below for an example, saved in your `nextflow.config` file:

```Groovy
manifest {
  description = 'Proof of concept pipeline implemented with Nextflow for X, Y and Z' 
  author = 'Marcel Ribeiro-Dantas'
  nextflowVersion = '>=23.04.0'
  manifest.defaultBranch = 'main'
  manifest.mainScript = 'script.nf'
}

```

For an nf-core pipeline example, check nf-core/RNAseq [here](https://github.com/nf-core/rnaseq/blob/b89fac32650aacc86fcda9ee77e00612a1d77066/nextflow.config#L318). And if you want to read more about the `manifest` scope, click [here](https://www.nextflow.io/docs/latest/config.html#scope-manifest).

---

<div class="post-metadata">

### Author: ![jonbra](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/jonbra/32/295_2.png) [@jonbra](https://community.seqera.io/u/jonbra)
#### Post date: [September 30, 2024, 6:48pm UTC](https://community.seqera.io/t/running-a-nextflow-pipeline-from-a-git-repository-setting-defaults/507/2 "2024-09-30T18:48:10Z")

</div>

If I have cloned the repo and have a local version of the pipeline, is it possible to force the run to use the pipeline from GitHub?

---

<div class="post-metadata">

### Author: ![mribeirodantas](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mribeirodantas/32/235_2.png) [@mribeirodantas](https://community.seqera.io/u/mribeirodantas)
#### Post date: [September 30, 2024, 9:24pm UTC](https://community.seqera.io/t/running-a-nextflow-pipeline-from-a-git-repository-setting-defaults/507/3 "2024-09-30T21:24:27Z")

</div>

One way to force Nextflow to run a remotely updated version of a pipeline, that you have already downloaded/cloned before, is to `nextflow pull` before.

```auto
nextflow pull nextflow-io/hello
nextflow run nextflow-io/hello

```

This won’t work if you have modified the local version though.

---

<div class="post-metadata">

### Author: ![jonbra](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/jonbra/32/295_2.png) [@jonbra](https://community.seqera.io/u/jonbra)
#### Post date: [October 1, 2024, 5:54am UTC](https://community.seqera.io/t/running-a-nextflow-pipeline-from-a-git-repository-setting-defaults/507/4 "2024-10-01T05:54:19Z")

</div>

I see. I wasn’t aware of `nextflow pull`. Thanks!
