Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialABHISHEK RAI
4,865 PointsPush Problem
while pushing from the cloned repository to origin for second time this error occurs:
Angads-MBP:first Angad$ git push origin new_feature Counting objects: 6, done. Delta compression using up to 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 729 bytes | 0 bytes/s, done. Total 6 (delta 1), reused 0 (delta 0) remote: error: refusing to update checked out branch: refs/heads/new_feature remote: error: By default, updating the current branch in a non-bare repository remote: error: is denied, because it will make the index and work tree inconsistent remote: error: with what you pushed, and will require 'git reset --hard' to match remote: error: the work tree to HEAD. remote: error: remote: error: You can set 'receive.denyCurrentBranch' configuration variable t remote: error: 'ignore' or 'warn' in the remote repository to allow pushing int remote: error: its current branch; however, this is not recommended unless you remote: error: arranged to update its work tree to match what you pushed in som remote: error: other way. remote: error: remote: error: To squelch this message and still keep the default behaviour, se remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'. To /Users/Angad/our_cool_project/ ! [remote rejected] new_feature -> new_feature (branch is currently checked out) error: failed to push some refs to '/Users/Angad/our_cool_project/'
ABHISHEK RAI
4,865 Pointstry to run this command on remote repository git config --bool core.bare true
push will happen but no changes will be seen on pushed files
Ashish Mehra
432 Pointswhere should i run this command in clone repository or original one
ABHISHEK RAI
4,865 Pointsoriginal one but still can't see any changes in original one
Ashish Mehra
432 Pointsyup i also not caught any change in my file
Ashish Mehra
432 PointsAshish Mehra
432 PointsSame here bro I am also getting same error and stuck here from morning