Pod repo push can not push to git - cocoapods

I have a private spec repo,such as MXNetworkSpec,when i use this command "pod repo push MXNetworkSpec MXNetwork.podspec",git can not push this MXNetwork.podspec to remote master,it shows that Everything up-to-date. what should i do ?

Related

How to update a website deployed on heroku?

I created a website that I deployed on heroku. I have made some changes there and am looking to update my website to reflect these changes. To do this, I ran the following commands:
git status
git init
git status
git remote -v
git add .
git commit -m"The file"
git push heroku masterbranch
I want to clarify that the masterbranch branch is a branch that has been created. The base branch of my website is master not masterbranch. The reason why, I created a new branch is that when I ran the command: git push heroku master I was getting the error:error: failed to push some refs to 'https://git.heroku.com/gkwhelps.git' But I don't think that is the reason why my deployed site does not is not up to date.
This has nothing to do with Git itself. See the heroku documentation, which notes that:
Heroku only deploys code that you push to the master or main branches of the remote. Pushing code to another branch of the heroku remote has no effect.
You mention:
when I ran the command: git push heroku master I was getting the error: error: failed to push some refs to 'https://git.heroku.com/gkwhelps.git'
When you push to the main or master branch, Heroku will:
read your code;
attempt to build your code based on what it read in step 1;
attempt to deploy your build from step 3.
Any of these three steps can have errors. If they do have errors, Heroku uses Git to relay these errors to you and then tells Git to produce the above error message. So Git says that your push failed, but that's because Heroku told Git to fail it. You cannot fix this problem by creating another branch. You must address the problems that occurred in steps 1, 2, and/or 3.
If you first push your code on Github and from Github do deploy, you shoud do:
git status
git add .
git commit -m 'changes'
git push
After that you should connect Heroku with Github and do deploy from that branch from Github.

pushing private pod

I am creating my own private pod. I have complete all step. But in last step when we call
pod trunk push AffleChat_msy1.podspec
We got error like
[!] Source code for your Pod was not accessible to CocoaPods Trunk. Is
it a private repo or behind a username/password on http?
I think what you are searching for is:
pod repo push [REPO_NAME] [POD_NAME].podspec
Before, you should consider that you need to tag your current version:
git tag ‘1.0.1’
Also pushing that tag.
git push --tags`
The --tags command pushes all tags, even unwanted. Push just one tag by: How to only push a specific tag to remote?
git push origin 1.0.1
See this medium article to get a good overview about how to update private pods.

Codeship: How to overide Codeship's automatic git push to Heroku?

At the end of my build, Codeship does an automatic push to Heroku. I would like to override this push with my own git push. How can I stop these lines from happening:
git remote add my-app git#heroku.com:my-app.git
git push heroku_my-app $CI_COMMIT_ID:refs/heads/master
What I would like to do is replace Codeship's auto git push with my own git push:
git add my-artifact.js
git commit -am "commited"
git remote add heroku git#heroku.com:my-app.git
git push -f heroku master
Codeship says there's an option to "configure the Heroku deployment to force push"
You can do the following
Delete the Heroku Deploy Step
Create a new Custom Script Deployment Step
Add the commands above
The go to the Environment Variables section and set HEROKU_API_KEY to your API key that you had used in the original Heroku Deploy Step

How to push to new git branch not with Xcode

I've been using a git branch with a remote repo as well (Bit bucket)
I decided to create a new branch so ran this code
Directory= ~/tmp/merge/aaa> git branch iOSUI/beta
Directory= ~/tmp/merge/aaa> git checkout iOSUI/beta
Switched to branch 'iOSUI/beta'
Then tried to push
Directory= ~/tmp/merge/aaa> git push origin iOS7UI/beta
error: src refspec iOS7UI/beta does not match any.
error: failed to push some refs to 'https://xxx/repo.git'
So I tried to create a remote branch
Directory= ~/tmp/merge/aaa> git branch origin iOSUI/beta
error: there are still refs under 'refs/heads/origin'
fatal: Failed to lock ref for update: Is a directory
After that failed I tried through XCode by selecting push and then it pushed successfully to
'origin/iOS7UI/beta'
Again I tried through the command line 2 options
Directory= ~/tmp/merge/aaa> git push origin iOS7UI/beta
error: src refspec iOS7UI/beta does not match any.
error: failed to push some refs to 'https://xxx/repo.git'
and this option with the '/'
Directory= ~/tmp/merge/pixtr> git push origin/iOS7UI/beta
fatal: 'origin/iOS7UI/beta' does not appear to be a git repository
fatal: Could not read from remote repository.
The recent default push policy "simple" would prevent you to push to a non-existent branch (unless it is set to be your upstream branch).
You would need to do:
git push -u origin iOS7UI/beta
But check first if the branch from which you have created your iOS7UI/beta is pushed or up-to-date compared to the upstream repo.
If it is behind, that means iOS7UI/beta is based on a parent SHA1 which isn't yet pushed to origin.

git with app in heroku and github

With an app in heroku, with git url like git#heroku.com:app.git,
And a repo in github https://github.com/username/other_app.git
Is possible sync the two repos for hosting the sema app in two git servers (heroku and github) ?
And also Link Heroku app to Github repo. For what?
Yes of course this is possible, because git is a distributed repository. You can configure multiple remotes, one at GitHub and one at heroku, and just push your changes to both of them.
Example:
Create repository at GitHub
Clone this repository on your machine, now you have setup the remote "origin" to be GitHub
Setup heroku and add the heroku git remote (either by running heroku create or heroku git:remote -a my_heroku_app). Find details in the git documentation of heroku.
here are some useful commands when working with github/heroku:
show github remote:
git remote show origin
show heroku git:
git remote show heroku
push github to heroku:
git push heroku master
if you have a 'staging' branch on github and want to push this to heroku git (master) for a
'staging app':
git push heroku staging:master -v

Resources