You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I work for Charles Schwab and I've run into an interesting issue. If I clone via the git command line, checkout the development branch, touch a file, add the file, commit the file and then do 'git push -u', I see the change in bitbucket on the development branch after doing a pull from another machine cloned with the development branch, both at work and on the web. If I clone via a plan in bamboo by selecting a clone task, and then try that same sequence above from a second task in the plan, from my home edition of bamboo here, git complains with the error:
"21-Sep-2018 13:38:38 Since Git 2.0, Git defaults to the more conservative 'simple'
21-Sep-2018 13:38:38 behavior, which only pushes the current branch to the corresponding
21-Sep-2018 13:38:38 remote branch that 'git pull' uses to update the current branch.
21-Sep-2018 13:38:38 See 'git help config' and search for 'push.default' for further information.
21-Sep-2018 13:38:38 (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
21-Sep-2018 13:38:38 'current' instead of 'simple' if you sometimes use older versions of Git)
21-Sep-2018 13:38:38 remote: error: refusing to update checked out branch: refs/heads/master
21-Sep-2018 13:38:38 remote: error: By default, updating the current branch in a non-bare repository
21-Sep-2018 13:38:38 remote: error: is denied, because it will make the index and work tree inconsistent
21-Sep-2018 13:38:38 remote: error: with what you pushed, and will require 'git reset --hard' to match
if I do the same push sequence using bamboo from a task at work, however, the change appears in the log to work:
development -> development
but if I do the pull from another machine thereafter, no change pulls down. Maybe I'm taking the wrong approach here, but I want to trigger a job that pushes directly to development to update the R package version whenever the development branch moves down via a PR. I was attempting to add my private rsa key to bamboo, but I'm getting a host-key error that the bitbucket cloud endpoint is not trusted, not sure how to make bamboo trust the cert of bitbucket in the cloud. My goal was to clone via a bash script using the command line, from the cloud, and try a push that way to investigate whether it's something with the way the clone is being created via bamboo's custom task. Can you please advise? Sorry for being so long winded.
If I run the following sequence from a bash shell, test.sh, I get the expected results:
git config push.default matching
git branch -a
git branch --track development origin/development
git checkout development
git branch -a
git add sample123.txt
git commit -m "add sample 123"
git push -u
If I add the above sequence to a script within a bamboo script, however, the log appears to show a successful outcome, but the file never gets pushed, please advise