Qt Creator and Git: No configured push destination - c++

I keep trying to push a local repo to a remote repo and I keep getting "No configured push destination."

I couldn't fix the problem using Qt creator so I ended up realizing that I wasn't committing a certain branch.
git push reponame master
did the trick

Related

GitHub repository created but unable to upload VS solution

I tried uploading a C++ project from Visual Studio 2019 onto my GitHub account.
The repository gets created when I do this however, none of my codes gets uploaded onto the repository.
Only the files ".gitattributes" and ".gitignore" appear in my repository.
Please could I have any suggestions on what I could do to fix this.
Close VS
Go to your local repository folder (the solution folder)
This will add all the files and commit them
git add .
git commit -m 'added files'
alternatively you can use "git add ___" to add one file at a time
Make sure you commit the changes and then do
"git push"
Re-open VS and everything should be setup now.
Here are some other instructions I wrote down recently which you may find helpful:
How to create a git repo from an ungitted local project already in development:
Create a empty repo on your repo hosting site
Go to your local project folder in git command line
git init
git add .
git commit -m 'message'
git remote add origin https://yourreposite.com/username/repo
git push -u origin master
Now you can open it in Visual Studio and everything is all setup

Github Desktop. Remote end hung up unexpectedly

I am using github desktop and the website. no git code, and I created a repository for my unreal engine 4 c++ project. I then try to publish the repository to github but I get this error
I have seen many posts with this error but none that use github desktop, just git code and it is not what im using.
I use windows, and also I cannot clone unreal engine c++ repositories either that I created at the college PCs.
thats the best I can ask sorry if my question is vague
error when publishing repository:
`https://pastebin.com/Rzdfbrwp`
error when cloning a repository from github (repository made in college pc)
`https://pastebin.com/72S18rD5`
You need to clone the repository with ssh.
Run the following command and remove your repository:
git remote rm origin
Then, try the command below and push afterwards:
git remote add origin git#github.com:username/project.git
It appears the internet I was using had protection on some websites because of the house policies of a student house. because of this it was messing up with big repositories and stopping the cloning.
not a github problem just figured it was the internet since it works fine in other internet. thank you all for you help it was my bad

How can I build my local git repo on external server?

In our company we have really powerful linux based build servers (double Xeon with 40 core) and not so powerful win7 laptops. We building our product in C/C++ language for an esoteric CPU. The compiler only exist in Linux. I can edit my git repo with Qt Creator. It is working and quite fast and everything. But I can't build the source on our Laptop. We have a main git repo and I can clone the same repo to my laptop and to our build server. I want to achieve that when I press the build button my code magically building on build server. I did a proof of concept solution where my build script do a git diff on my repo and scp it to the build server than it ssh to build server apply that diff on the server repo than start and wait the compilation. But that solution is not so fool proof. I think a better approaching/method is exist. So how can I build my git repo on external server?
If you can push to a bare repo on the build server, then you can associate to that bare repo a post-receive hook (.git/hooks/post-receive) which will:
checkout the code
#!/bin/sh
git --work-tree=/var/www/domain.com --git-dir=/var/repo/site.git checkout -f
trigger the compilation.
That way, you don't have to handle the diff yourself.
You only have to associate to the build button the action to push your branch to the bare repo of the build server, and the post-receive hook will do the rest.
You could switch to a forking Workflow, where each developer in the company has a personal public bare repo, which is a fork of the official central repository.
Then, when you want to build your changes, you push them to (a branch or the master of) your own personal public repo.
The build server not only clones the official central repository, but also your public repo. So when you push to your personal public repo, the build server merges the changes and does a personal build for you. Just like it probably already does for the official central repository?
Note that this is not too different from #VonC s answer, just focusses a bit more on the workflow. The personal public repo may well be on the build server, like #VonC suggests. Or it could be somewhere else. As long as it's some place public enough that the build server and you and your colleagues can find it.
Consider integrating http://jenkins-ci.org/ to your workflow, to take care of the build process, using a "git post-receive hook" to trigger the build as (suggested by #VonC).
If you want to use the "Forking Workflow" as suggested by #flup, you can take a look to http://gitlab.com which provides an easy way to manage pull/merge requests, fork repositories and to add hooks.

Git and KDevelop

I'm starting programming with KDevelop and Git.
I'm creating a project in C++ with KDevelop 4.4.1 and actually I've a Git account in Assembla.
I'm able to create an "internal git repository", doing commits with KDevelop.
I was researching about how I can PUSH my project into my account, but I didn't found enough information. How I can push my project to my repo in Assembla?
Pushing generally is done like this:
Before the first push you should add a remote:
git remote add origin pathToRepositoryInAssembla
Now for the first push (I'm assuming your default branch is master)
git push -u origin master
This will push your changes and git will no assign the origin/master to your local master. After this by using
git push
It will automatically push all “assigned” branches that contain changes.
For more information on how to use git refer to the official handbook. For more information on remotes refer to Working with remotes.

Git - setting up a remote repository on ec2 and doing an initial push

I'm following this tutorial to set up a remote repository on Amazon EC2.
When it comes to doing: git push -u origin master
I get these errors:
src refspec master does not match any.
failed to push some refs to 'bitnami#xxxxxxxx.com:project.git'
I am using a bitnami djangostack image and I believe the problem originates from here. I have followed the exact same instructions and gotten it working when using a standard Amazon Linux image..
That means you did not configured the remote repository location correctly.
Need more information to solve this.