Git is soooo confusing. I seem to be in an infinite regress,
then when I tried to fix it by following their hints, I think
I mistakenly merged straight into develop. Argh!
Here's what happened:
I created a branch issue-1363-__float128.
I then updated the var ctor to solve the __float128 issue.
But I could't push it back to origin. Here's what happened:
~/stan(feature/issue-1363-__float128)$ git status
# On branch feature/issue-1363-__float128
nothing to commit, working directory clean
~/stan(feature/issue-1363-__float128)$ git pull
Already up-to-date.
~/stan(feature/issue-1363-__float128)$ git diff develop
diff --git a/src/stan/math/rev/core/var.hpp b/src/stan/math/rev/core/var.hpp
index 5ed6b85..be7b43f 100644
--- a/src/stan/math/rev/core/var.hpp
+++ b/src/stan/math/rev/core/var.hpp
@@ -1,12 +1,12 @@
#ifndef STAN__MATH__REV__CORE__VAR_HPP
#define STAN__MATH__REV__CORE__VAR_HPP
+#include <boost/math/tools/config.hpp>
#include <ostream>
#include <stan/math/rev/core/vari.hpp>
#include <stan/math/rev/core/grad.hpp>
#include <stan/math/rev/core/chainable.hpp>
#include <stan/math/rev/core/chainable_alloc.hpp>
-#include <boost/utility/enable_if.hpp>
....
~/stan(feature/issue-1363-__float128)$ git push
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:develop
To push to the branch of the same name on the remote, use
git push origin feature/issue-1363-__float128
~/stan(feature/issue-1363-__float128)$ git push origin feature/issue-1363-__float128
To
https://github.com/stan-dev/stan.git
! [rejected] feature/issue-1363-__float128 -> feature/issue-1363-__float128 (non-fast-forward)
error: failed to push some refs to '
https://github.com/stan-dev/stan.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Then I'm pretty sure I totally messed things up by pushing directly
into develop by trying to read their hint to solve my problem:
~/stan(feature/issue-1363-__float128)$ git push origin HEAD:develop
Counting objects: 20, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.09 KiB, done.
Total 9 (delta 7), reused 0 (delta 0)
To
https://github.com/stan-dev/stan.git
6bdee3f..3a6904a HEAD -> develop
~/stan(feature/issue-1363-__float128)$ git status
# On branch feature/issue-1363-__float128
nothing to commit, working directory clean
~/stan(feature/issue-1363-__float128)$ git pull origin develop
From
https://github.com/stan-dev/stan
* branch develop -> FETCH_HEAD
Already up-to-date.
~/stan(feature/issue-1363-__float128)$ git push
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:develop
To push to the branch of the same name on the remote, use
git push origin feature/issue-1363-__float128
~/stan(feature/issue-1363-__float128)$
Could someone help me untangle this mess?
Sorry I keep messing Git up.
- Bob