Solved

Why can I not "push" my branch to DEV

Posted on 2016-08-24
4
127 Views
Last Modified: 2016-08-27
No doubt, someone who's more familiar with GIT can look at this and tell me what I'm missing.

All I want to do is push my current branch up to DEV. I've used this command, "git push -u pop_up" and I keep getting this error:

GIT screen
..."pop_up does not appear to be a proper repository."

And as an aside, when I go to checkout "development," I get a message that says, "Please commit your files or stash them before you switch branches." Is there anyway to override that? The "changes" they're referring to are not relevant so I don't care if they get overwritten.

Thanks!

What am I missing?
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:Jeffrey Dake
ID: 41769731
If you have changed files you need to either commit them or do a reset to get rid of your local changes.   There is really no point in pushing if you don't have committed changes, since the point of pushing is to push your committed changes up to the remote repository.  If you do a "gift status" you should be able to see the uncommitted files you have. If you want those up to your remote repository you will need to commit the files and then do a push.

Hope this helps
0
 

Author Comment

by:brucegust
ID: 41770176
The problem, Jeff, is that I've committed the changes I need to push. But then if I go in and change a comment (not the code, just a comment) on another page that's not even relevant to the task I'm trying to accomplish, now I've got this dynamic that says I've got to commit these "changes," when they're not really changes at all.

I did figure out how to push what had been committed since I posted this question. I did "git push -u origin pop_up," so that's gold!

But if you could tell me if there's a way to let GIT that there's nothing that I need to commit beyond what I've already committed, when that kind of "warning" comes up, that would be great!

Thanks!
0
 
LVL 10

Accepted Solution

by:
Jeffrey Dake earned 500 total points
ID: 41771000
If these files are files that you never need to commit, you can use a gitignore file to permanently ignore any changes that you make to those files.  I often use that for local settings files.

https://help.github.com/articles/ignoring-files/

Hope this is more of what you are talking about.
0
 

Author Comment

by:brucegust
ID: 41773329
Perfect!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
How to create a Git repository using GitHub, and how to clone and checkout the repository using the EGit plugin for Eclipse.
Explains the Git Index and the differences between a Remote, a Remote Tracking Branch, and a Local (or Tracking) branch.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question