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 trialKsenija Klimova
6,163 Pointsgit config --list
When I type in git config --list command, I get "push.default=simple "(see the screenshot) instead of the clear line as she did. How does it influence the next actions I make, because I can't push my project to the repository, so I thought that could be the reason. file:///C:/Users/Ksenia/Downloads/MuM5fI9a_Io.webp
Ksenija Klimova
6,163 PointsI' m sorry for that! Hope this one will work https://snag.gy/sQaX9f.jpg
Steven Hughes
17,974 PointsI was unable to replicate your issue on my own personal machine. However, here is an explanation of what GIT is trying to tell you.
push.default Defines the action git push should take if no refspec is explicitly given. Different values are well-suited for specific workflows; for instance, in a purely central workflow (i.e. the fetch source is equal to the push destination), upstream is probably what you want. Possible values are: nothing - do not push anything (error out) unless a refspec is explicitly given. This is primarily meant for people who want to avoid mistakes by always being explicit. current - push the current branch to update a branch with the same name on the receiving end. Works in both central and non-central workflows. upstream - push the current branch back to the branch whose changes are usually integrated into the current branch (which is called @{upstream}). This mode only makes sense if you are pushing to the same repository you would normally pull from (i.e. central workflow). simple - in centralized workflow, work like upstream with an added safety to refuse to push if the upstream branch's name is different from the local one. When pushing to a remote that is different from the remote you normally pull from, work as current. This is the safest option and is suited for beginners. This mode will become the default in Git 2.0. matching - push all branches having the same name on both ends. This makes the repository you are pushing to remember the set of branches that will be pushed out (e.g. if you always push maint and master there and no other branches, the repository you push to will have these two branches, and your local maint and master will be pushed there). To use this mode effectively, you have to make sure all the branches you would push out are ready to be pushed out before running git push, as the whole point of this mode is to allow you to push all of the branches in one go. If you usually finish work on only one branch and push out the result, while other branches are unfinished, this mode is not for you. Also this mode is not suitable for pushing into a shared central repository, as other people may add new branches there, or update the tip of existing branches outside your control. This is currently the default, but Git 2.0 will change the default to simple.
Please let me know if that helps.
Ksenija Klimova
6,163 PointsThank you so much! It actually helped me a lot:)
1 Answer
Steven Hughes
17,974 PointsExcellent, do you mind choosing a best answer? Glad it helped Git can be tuff to wrap your brain around but it is worth it.
Steven Hughes
17,974 PointsSteven Hughes
17,974 PointsI am unable to see your screenshot. Could you please provide a screenshot?
Going off what you have you probably are running into one of the issues with Treehouse's emulator where you may have a space before or after your command.
Or
You may not have run your git init, git config --global user.name "Sam Smith"
Often with git we are skipping a step and git does not understand and always remember to push before your pull.