Xcode bot does not see repository branches - xcode-bots

After updating the XCode to version 11.4 (11E146), I stopped seeing repository branches in the bot settings. But I see these repository branches in Source Controll Navigator. Does anyone know how I can fix it?

This issue was resolved in Xcode 12.
OLD answer & workaround for Xcode 11.4 - 11.x:
Unfortunately it's a known issue in the Xcode 11.4 release. https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_release_notes
Find this Stack Overflow answer to change the branch manually via the Xcode Server API: https://stackoverflow.com/a/42573925/1372065

Looks like this is fixed in XCode12, In case you still need to use XcodeServer on Xcode 11.4 - 11.5 then follow the below steps
In the final step, add a pre-integration script and add the below git commands
git pull
git checkout `your-branch-under-test`
git branch

Related

Xcode cannot clone project from github

I just started using GitHub today. Why this is happening?
I used http request
First you need to connect your GitHub account to Xcode and then select a project to clone... If something goes wrong, you need to reinstall Xcode.

Merging branch into master in Xcode 11?

I must be missing something very simple here. I never had a problem merging branches into master on earlier versions of Xcode, but I don't have the option on any projects while using Xcode 11.
How should I merge into master? Thanks.
This is a frustrating Xcode 11 issue.
As a workaround you can checkout master first and then merge the required branch into it.

For development in Xcode 10.x, how well does the git integration work with github?

Since Apple has pulled subversion integration from Xcode (and Perforce never choose to directly support that integration since Xcode 3), it seems as if git is the only fully integrated source code control system for MacOS and IOS development.
How well does Xcode 10.x integration work with GitHub?
In addition to Xcode's integration, what are some polished MacOS apps that serve as stand-alone git clients?
My experience with the git command line has not been great: I'm always getting into trouble where the repository gets messed up ("detached heads", for example) and it seems to take someone with a PhD in git to get me back to a functional, stable repository. Will GitHub help in those situations?
Xcode 10 integration with git is very intuitive and reliable. You can use Xcode for commit, push and see history of commits and so forth. Also Github macOS application works fine but I personally prefer Xcode to do so.
Using Xcode 10.2.1 with git and GitHub, brought me many troubles. I lost one day of development, because even though committing seemed fine inside Xcode, no commit was performed on the local .git repository nor on the remote Github repository.
The only way to recover a proper functionality was to checkout to the last committed version and loose all the job in between.
I have not been able to figure out the exact cause, but I noticed that opening several projects in Xcode and/or using playgrounds while developing on a project seems to corrupt Xcode git functionality. Quitting and relaunching Xcode corrects the trouble, most of the time ...

Push tags with Xcode 9

From cli I push tags like this
git tag 1.0.1 && git push origin 1.0.1
From Xcode 9 I can tag commits. But, how do I push that tag to origin from Xcode?
As of Xcode 10.0 beta (10L176w) (released 2018-06-04, coincident with WWDC18), we can now optionally push tags to the remote during normal push actions. (Source Control -> Push...) There does not, however, appear to be a mechanism to selectively push tags.
Historical Info
As of Xcode 9.1 (9B55), this is currently impossible. I'm certain it will be fixed in an update (though it doesn't exist in Xcode 9.2b2).
As an aside, if you have made several tags and want to push all of them to the remote from the command-line, you can do git push origin --tags.
Update 2018-04: pushing tags still unimplemented as of Xcode 9.3 (9E145)
Update 2018-05: unimplemented as of Xcode 9.4 (9F1027a)
To my further surprise, setting git config --global push.followTags true, which causes all reachable and annotated tags to be pushed when performing git push, has no effect from within Xcode. (Info on push.followTags)
Update 2018-06: The release notes for today's Xcode 10 beta include this quite satisfying entry:
Tags can optionally be pushed from the push sheet. (40141815)
😊
I'm downloading it now and will confirm once it is installed.
Tag name should start with an alphabet. For example, v1.0.1. Then it will reflect in the remote repository.

How to pull files from github branch to xcode directly?

I have a project created for me by teacher and I have to improve it. He created a repo on Git Hub with branch for me. I'm trying to pull the project files from that branch directly to Xcode and Xcode refers to the branches that I have created which are empty, not the master one. Can't find any adequate manual for that as well... Please help...
so github uses git to manage repositories, so this question has more to do with git than with github.
Git is a distributed-repository source-control system, which means that every machine has a full copy of the repository, with all of its history and branches. This means that your local repository that you cloned from GitHub has all of the branches on it.
So, your problem is actually just that you need to switch branches locally to the branch your professor created.
In a terminal you can execute
git checkout <the-name-of-the-branch-your-teacher-created>
and that should do it. :)
Xcode is simply looking at the files in your working directory, so switching branches will update the files in Xcode as well.
For more git information check out the git book or any of the other countless git resources online!
Well using Git is fairly simple and as specified above can pull the project (either complete of specific brach and then import it.
OR
While running Xcode you can follow below steps -
Click on Check out an existing project.
Enter Repo link as shown below and hit Next.
Select the branch that you want to pull and hit Next.
Note As shown in Image Xcode version 8.2.1 is used.

Resources