I currently have an Xcode project which has a remote in the organizer for a Bithucket repository. I want to start the project over with a fresh template. However I do not want to lose all my previous commits I just want a brand new project in Xcode but to Bitbucket it should just be like another commit. How do I go about in doing this? I would like instructions on what I do in Xcode and what I do in Bitbucket. Thanks in advance!
I've never used the built in git client in XCode, but one idea would be to create the new project, migrate over the .git folder and .gitignore (if there is one) together with the source files and resources you may need.
I'm bit curious to why you'd want to create a new project.
I'd also recommend using the terminal version of git, but that's just an aside.
It sounds like you might actually want a new project hosted on BitBucket. You have unlimited private repositories; use them.
If for some reason you want to use an anti-pattern, you could just create a separate branch for each of your products. It is much better to just create another repository for new projects though. Otherwise, it is not clear what you are tracking in the repo.
Related
I'm a rank novice in Azure DevOps and I was using a local coding project in VS 2019/Team Explorer to learn about GitHub, Azure, version control, pipelines, PRs, etc. I created a project, added files and, for quite a few months, I thought I was getting the hang of it. A bit of overkill, but it was worth the learning experience.
Then a few days ago, after a month's hiatus, I returned to complete work on a local branch and nothing seemed to work correctly. I can't recall what errors initially appeared (I attempted way too many "solutions" without really understanding what I was doing) but edit conflicts showed up, I couldn't sync, pushes didn't work, and nothing I could think of would allow me to resynchronize (not in the Team Explore sense) with the remote repo. Edits I make in local files no longer show up as Changes in Team Explorer ("There are no unstaged changes..." despite my editing files, no "Commit" or "Stash" command is enabled).
How do I wipe the project's repo slate clean in Azure? I just want to start over, learn from my mistakes and carry on fresh.
I would like to establish a new baseline, if you will, clear all the branches, commits, PRs, and the work items. I would like to keep the Project settings, the Overview (Summary, Wiki, Dashboard) and possibly the pipelines.
Do I need to create a new project?
Any advice would be appreciated.
For the issue in Visual Studio:
You could try to re-connect the Project in visual studio and clone the Azure Repo to a new Path.
In this case, you can get the latest Azure Repo content again. Then you could make changes in local and push them to azure repo.
For the requirement: establish a new baseline
You don’t need to create a new project. You can directly create a new repo in the current project and push the files to the new repo.
Here are the steps:
Step1: Navigate to the old repo and select the branch that needs to be moved to the new repo. You could use the “Download as Zip” option to download all files to local machine.
Step2: Create a new Repo in the current project.
Step3: Unzip files on local machine. Connect to the new Repo in Visual Studio.
Then you can add all files as changes to push to azure repo.
The new repo will have no old branches, PRs and commits. But other parts will not be affected.
Hope this helps.
How do you work in team on react native projects?
I'm working in Team of 2 people and having a lot of issues with working on the same project.
I don't understand how to properly create an environment so we can sync our code between each other while working on the same project. Now, we create a git repo with /ios and /android folders, but the thing is: the /ios folder always needs to be changed, because it links to the computer that was last building the project.
For example: we are working at the same time on different .js files and add a new npm dependency and we wish to sync our changes, so we commit changes to the Git repo and try to sync, this is where our pains begin.
The one need downloading the changed has to go to Xcode and manually update all the Framework Search Paths, Header Search Paths, delete libraries that Xcode doesn't see and then add them again.
I know it's moreof an Xcode problem, but I didn't see any detailed guide about team syncing in projects. I know that at Facebook people are doing a lot of cooperative work and I'd appreciate some input over our issues!
If you are using git, you can configure your .gitignore-file to prevent committing xcode-specific stuff and other configuration files.
I can highly recommend gitignore.io, which is a "web service designed to help you create .gitignore files for your Git repositories" [Source].
You can for example type in XCode (or AndroidStudio, ReactNative, Gradle, etc.) and it will automagically generate a .gitignore file for you.
How do I add Source Control to an existing project?
On some of my projects (originally created in Xcode3) I added Source control in Xcode4. I recollect there was an option to do this.
I now want to do similar for some old projects, but can find no way to do so.
I have searched and the only "solutions" I can find is to create a new project, and copy the original source files.
Unfortunately the way Xcode5 structures a new project is quite different, so this is not straightforward.
Is there a way to do this in Xcode5? I could probably do this in git, or even go back to Lion, but I am sure I am not the only person who wants to resurrect an old project.
Xcode doesn't have an option to create repositories for existing projects. You'll have to create a git repository from the command line. Launch the Terminal application, navigate to your project's directory, and run the git init command to create a git repository for your project.
If Xcode doesn't automatically recognize the repository you just created, open Xcode's Accounts preferences and add your repository from there.
We're trying to set up github version control for a Jsp-project in NetBeans 7.0.1. The problem is we don't have a clue what to do. I Have set up a public account on github and done all the steps in the install guide on github, ssh keys and everything. So if I wanted to work on my own in this project I wouldn't have a problem.
The problem is how to get my collaborator started. He has an account on github. he set it up with ssh keys and such. In the admin view on github I added him as a collaborator, but we don't know the next step.
So the question is how to connect the collaborator to the project? something like this I suppose?
git remote add origin git#github.com:username/Hello-World.git
git pull
(another question: Do I git only the source files or the whole project folder?)
Regarding your second question... That's a tough one.
A few months ago I was working with a colleague on a JavaEE project and we initially decided to share the whole Eclipse project. Since I was working on Windows and he was working on Linux, we had much trouble maintaining everything. Also we had to make sure that we don't accidentally push up our .project dir, because that would overwrite the settings on the other persons machine, messing up the whole project. So we ended up removing all the project files from the repository and just keeping the source folders (src and WebContent).
Both of us set up an empty project, made our settings and than imported the source code from the repository. Was some trouble setting it up until everybody had the same project settings, but afterwards it worked like a charm.
For just two developers that is fine, I guess for a bigger team, there might be better solutions.
So, I guess Netbeans handles the project settings in a similar way. So in my opinion you should just share the code.
For the first access, what your collaborator should be able to do is a git clone of your repository.
That will set for him the remote address.
If he is declared as a collaborator, he then should be able to push/pull to that remote repo.
Note that your collaborator should have received a push notification access.
I have a project on github that my developer and I used to collaborate on an iPhone app. That was my first exposure to version control and I used only a few tasks/commands: push, pull, stash on occasion.
We're now looking into making an OS X version and I'd like to use that previous project as the starting point for this new project.
It seems like this is FORKING the project. But I want to make sure that, once copied, the new (OS X) project has nothing to do with the previous (iOS) project. Is that what forking does? I've usually only heard it in regards to adding features. I've also heard the term cloning, but I believe that refers to making the local copy?
Try this:
Create a blank new project on GitHub
Do a git clone on the latest version of the iOS project to make a new copy of it.
Edit the information in the git config under .git in the copy folder to point to the new project on GitHub.
Forking is what you want. Creating a new project will lose the history from the original project, and will make it considerably more difficult to merge changes back and forth between the two. (Which you're likely to end up wanting to do if the projects are related at all.)