Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ref: issue #23 - Tryng to automate tracking of origin/develop #137

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions git-flow-init
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,21 @@ cmd_default() {


# TODO: what to do with origin?

# We are on develop, so let's automagically track origin/develop && make
# sure it is updated
if git_branch_exists "origin/$develop_branch"; then
git branch --set-upstream "$develop_branch" "origin/$develop_branch"
warn "Now pulling updates from origin/$develop_branch to $develop_branch ..."
git pull
else
warn "It seems to me you are using git-flow-init for the first time on this git repository."
warn "Thus, you may likely find rather useful to run"
warn "\n\t\tgit branch --set-upstream ${develop_branch} origin/${develop_branch}\n"
warn "after your first push of branch: ${develop_branch}"
warn "\t\t( git push origin ${develop_branch} )"
fi

}

cmd_help() {
Expand Down