Skip to content

Conversation

@jacob-s-son
Copy link

I am not sure though where it's fetching repo. This obviously won't work if jarvis copy of the repo is not aware of the new branch.

@RadekMolenda
Copy link

👍

@benflex
Copy link
Contributor

benflex commented Sep 18, 2014

What if you do a git fetch and then git checkout for the branch ?
i.e.
cmd += "git fech; git checkout #{params[:branch]}"

@jacob-s-son
Copy link
Author

That's an option. Will update.

@pointlessone
Copy link

git fetch && git checkout

Is probably better.

@jacob-s-son
Copy link
Author

But git pull is still needed right, as non of those is going to merge ?

@benflex
Copy link
Contributor

benflex commented Sep 18, 2014

No sure why we would need to merge since no work is gonna be done ever on the server ? This probably needs to be tested.

@benflex
Copy link
Contributor

benflex commented Sep 18, 2014

Or we can do :
cmd += "git fetch; git checkout #{params[:branch]} && git pull origin #{params[:branch]}"

@jacob-s-son
Copy link
Author

I have tried out locally simply fetch + checkout, works fine if you simply updating outdated repo and switch to a branch, that is not merging anything.

I think let's go with @cheba proposed git fetch && git checkout params[:branch]

WDYT?

@benflex
Copy link
Contributor

benflex commented Sep 18, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants