Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

commit and pushing code from a plan

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
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
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.

1 answer

If I run the following sequence from a bash shell, test.sh, I get the expected results:

#!/bin/bash
git config push.default matching
git branch -a
git branch --track development origin/development
git checkout development
git branch -a
cd test
ls
touch sample123.txt
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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

224 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you