diff --git a/git-flow-init b/git-flow-init index 57ab2441e..441d410ee 100644 --- a/git-flow-init +++ b/git-flow-init @@ -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() {