I've setup my vps with this tutorial
but when I push from my local repository to the remote i get this error:
... sending is complete but...
remote: Resolving deltas: 100% (1316/1316), done.
remote: /bin/sh: 0: Can't open git —work-tree=/var/www/my_website.com/html --git-dir=/var/repo/my_website.git checkout -f
To ssh://xxx.xxx.xxx.xxx/var/repo/my_website.git
* [new branch] master -> master
I've set: chmod -R 777 /var/repo/my_website.git
along with chmod +x post-receive
Is there an issue with the permissions of the /var/www/my_website.com/html ?
How do i solve this? Im trying to push a rails 6 project
git push -f origin master
I hope this will forcefully push all the changes from the local repository to the GitHub repository.
Related
I am having some problems with bitbucket. All my project folders and files are uploaded except the src folder. The src folder in my computer has files and folders. But it is not appearing in bitbucket. Why is the src folder appearing like that in bitbucket?
I enter the commands:
git init
git add .
git commit -m "initial commit of full repository"
git remote add origin
https://boidurja#bitbucket.org/boidurja/kapstone.git
and I get this error:
F:\BOP consultancy and services\vuetify project\kapstoneui>git remote add
origin
https://boidurja#bitbucket.org/boidurja/kapstone.git
fatal: remote origin already exists.
And I enter this command:
git push -u origin --all
and I get this error:
F:\BOP consultancy and services\vuetify project\kapstoneui>git push -u
origin --all
To https://bitbucket.org/boidurja2/kapstone.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to
'https://boidurja2#bitbucket.org/boidurja2/kapstone.git'
hint: Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Can anyone help?
Created a repository on bitbucket. Trying to "push up" to the repository, though am unsure exactly what that means?
Also, and more importantly, I get an error when trying to execute two lines:
$ git remote add origin git#bitbucket.com/addyd/toy_app.git/src/master
fatal: remote origin already exists.
Addy#DESKTOP-6L1EGSI MINGW64 /c/Sites/environment/toy_app (master) $
git remote add origin git#bitbucket.com/addyd/toy_app.git/src/master1
Any help?
what it returned if enter the command git remote -v
if there is already a git remote origin exist it will print something like
origin https://bitbucket.com/addyd/toy_app.git(fetch)
origin https://bitbucket.com/addyd/toy_app.git(push)
if it is already there and pointing to the right repository do ACP
git add .
git commit -m "commit message"
git push origin branch
The right command to update change origin would be:
git remote set-url origin ssh://git#bitbucket.org/addyd/toy_app.git
But you shouldn't need to update origin if it was set before, and if you cloned successfully that repo: add some commits, and then:
git push -u origin master
I read the "How to Create a CocoaPod in Swift" and I got stuck when I tried to push to git:
cd ~/Documents/Libraries/RWPickFlavor
git init
git add .
git commit -m "Initial commit"
git tag 0.1.0
git remote add origin [Your RWPickFlavor Git URL]
git push -u origin master --tags
when I execute the last instruction,the terminal outputs that I don't handle protocol '[https'
Note: My git version is 2.3.2,and Pod version is 0.38.0
Are you sure you set up your remote URL correctly? You can check it with this command:
git remove -v
I suspect yours has square brackets in it, like this:
origin [https://github.com/...git] (fetch)
origin [https://github.com/...git] (push)
It should look something like this:
origin https://github.com/...git (fetch)
origin https://github.com/...git (push)
You can download the GitHub App and push to repository without using termal/commandline
aslong as you have ticked git repo when you created the xcode project
here are the steps :
git add .
git status
git commit -m "initial commit"
git push -u origin
This works perfectly
heroku login
heroku create --stack cedar
git push heroku master --ERROR
HERE IS THE LOG:
D:\boot>git push heroku master
Initializing repository, done.
Counting objects: 1711, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1522/1522), done.
Read from remote host heroku.com: Connection reset by peer
fatal: sha1 file '<stdout>' write error: Invalid argument
error: failed to push some refs to 'git#heroku.com:blooming-hollows-3183.git'
What are the refs missing?
Im trying to push to github
I follow the steps:
(before these lines Im located on my app directory)
$ mkdir estaciones
$ cd estaciones
$ git init
>>Initialized empty Git repository in /Users/armandodejesussantoyareales/Documents/project_newbie/Estaciones/estaciones/.git/
$ touch README
$ git add README
$ git commit -m "phase 3 estaciones"
>>[master (root-commit) 4462be3] phase 3 estaciones
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100755 README
(I don't know if that message is an error)
$ git remote add origin git#github.com:asantoya/estaciones.git
$ git push -u origin master
but always I have the same problem,late that I type that i got the next error
To git#github.com:asantoya/estaciones.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git#github.com:asantoya/estaciones.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
This means that the remote repository already has a master branch and it has stuff in that branch that has been added since you made commits to your local copy. This is referring to the code visible at https://github.com/asantoya/estaciones
Start by cloning the repo from github, then adding your changes to it, then pushing:
git clone https://github.com/asantoya/estaciones.git
git checkout -b nameofyourbranch master
Add some files etc.
git commit -a -m "Your commit message"
git push origin nameofyourbranch