Why git pull rebase does not update my local folder? - ios

Why git pull rebase does not update my local folder?
I have below groups in one of my Git version controlled iOS projects,
-- App
-- Libs
I see, for my project in Xcode, group name and physical folder name for Libs folder is same (i.e. CamelCased) but for all other team mates, the group shows CamelCased where their physical folder name is showing divergent (smallcase, libs). I have done git pull --rebase and got the latest of remote repository. But still the folder name does not get updated.
Inside Libs folder we have some library and surprisingly app is building fine for all members including me.
Why Git cannot detect the divergence between local physical folder and remote origin folder name? What should I need to do to make my local code exactly same as origin? Note that, when I clone the project in a new location, I see the folder name is small cased libs.
git prune did not help as well.

It seems git don't change case only changes.
If you want libs you can rename your local folder safely
if you want your team has Libs make a commit with the folder renamed _Libs and another one next after, with the folder renamed Libs.

Related

How to delete the files/folder from git repository without deleting the Git history

I need to delete the outdated folder v1 from app/controllers/api folder. Now we have updated v2 folder inside api/controllers. But I need to preserve the v1 folder git history. Any help would be highly appreciated.
Committing the deletion of files does not affect the history.
#bcmcfc is correct. You can simply delete the folder in your text editor, then commit then changes to your github. It will remove the folder from your Github repository, but the folder will still be available in your git version history. Hence the entire reason for version control software.

How to delete all local and remote Git on Xcode 7 project

I'm working on an iOS Xcode project whose previous developer has configured and committed to local git and remote git using his account. Now I want to delete every source control existing on the project (local and remote) and recreate a new one. How can I make everything fresh so that I can commit and use the source control? (I don't have the previous developer account.)
in order to delete your local git you need to open your file system where your project is located and delete the .git folder. please notice that this folder is hidden by default so you will need to show hidden files and folders before doing it.
Delete of remote repository should be done on the server. If for example your are using github.com then you need to go to github.com and inside your repository go to settings tab and on the bottom you will see the Danger Zone there you can delete your remote repository.
The easiest way is to remove the invisible .git directory at the root level of the project. From there, you can recreate the repository and any remotes.
Be warned, this will delete all history for this project!
To remove all local and origin branch from XCode 8 follow these steps :
1. Source Controll / ProjectName/ Configure ProjectName.
2. In Configure ProjectName Window select Branches tab.
3. Select any branch name from local or origin.
4. Click on "-" icon on bottom left.
That branch will be removed from local machine.
And for removing branches from Github server you can delete repos from server.

how to setup svn repository on Xcode 6?

I just started to work with Xcode and trying to add a Subversion repository on remote windows server. When I enter the location path of Subversion repository, it shows following error message:
Error Message :
“Host is not reachable.”
Please can anyone help? Thanks.
Setting up svn source control is always a pain even without Xcode, and Apple couldn't help on it with its integration to Xcode. It changed from version to version and the latest is similar since version 5, so the same is in Xcode 6.
The only problem with this solution that we always have to combine command line and Xcode GUI steps, but this is the only working solution so we will follow this, but using Xcode when it's possible.
As I made it several times but always run into various problems I decided to make a detailed and clear up to date description.
The server side
Even you could install the svn server on your machine it's not a safe solution even you work alone. You could lost your years of work with a faulted hard disk or any accident. So make it on a separate computer.
You need an svn server installation on it and a login. You could check it, just ssh into your server and use the command in terminal
which svn
If you get a version number you have svn possibly with a living repository directory on that server and you can reach it. The exact location is depending on your installation but in our case the main repository directory is: https://myserver.me.com/Library/Subversion/Repository/
You will create your new repository under this directory like
https://myserver.me.com/Library/Subversion/Repository/MyNewApp
1. Create a NEW repository
Login to your server (in our case myserver.me.com) then open the Terminal utility and use the svnadmin create command to create a Subversion repository.
For example, if you want a repository named MyNewApp in the existing location /Library/Subversion/Repository/, you would enter the command:
svnadmin create /Library/Subversion/Repository/MyNewApp
This will create the main structure of the repository. We log out from server to avoid any problem and don't use it directly from now, just from the client side.
The client side
2. Create the folder structure
Note: Creating a hierarchy for your repository is optional. It's not needed in order to get svn to work properly, but if you're
planning on keeping multiple projects under source control, then it's
a good idea to get organized before you start importing those
projects.
We will prepare the folder structure on the client then we will transfer it to server with an svn command named "import".
1.First create a new temporary folder anywhere on your client - for example on your Desktop -with the project/repository name in Finder in our case MyNewApp:
MyNewApp
Then make 3 other folders in it with the exact name:
trunk
branches
tags
2.Import the folder structure to the svn server
Login to you client with Terminal utility and using "cd" command go into the project folder:
cd MyNewApp
Tip: The easiest way to get the full path to a folder into Terminal
without risking typing errors is to first type the cd command and
enter a space, and then drag the folder from the Finder and drop it at
the end of the Terminal command line.
3.Then use the svn import command from Terminal:
svn import . https://myserver.me.com/Library/Subversion/Repository/MyNewApp -m "Initial import of directories for MyNewApp project."
or
svn import . svn+sshtunnel://yourLoginName#194.149.155.124/Library/Subversion/Repository/MyNewApp -m "Initial import of directories for MyNewApp project."
The second is the most secure usage with ssh keys where 194.149.155.124 is the server's IP address. svn+sshtunnel:// means it use svn and sshtunnel but it could be any other depending on the login mechanism like https:// or svn:// The "." after "import" command is important it means the same folder where you are.
If the import was successful, you should see something like this:
Adding trunk
Adding branches
Adding tags
Committed revision 1.
Note: This means this is the first committed version you loaded to the server to MyNewApp repository and it's under revision control by
svn with a message just referencing what you did, and you could use
what you like. Now that you have imported the directory structure for
your project into the repository, you can now delete the MyNewApp1
directory on your computer that you just created. Doing this will help
to prevent confusion later, when you import the real project.
3.Import the Xcode project into svn
Using terminal navigate to you Xcode project and make sure again that you are in the project folder
cd MyNewApp
then use the following svn command again:
svn import . https://myserver.me.com/Library/Subversion/Repository/MyNewApp/trunk/MyNewApp1 -m "Initial import of MyNewApp1 project."
or with an exact location on your computer /Users/myUserName/Apps_Developing/myNewApp
svn import -m "New Import" /Users/myUserName/Apps_Developing/myNewApp https://myserver.me.com/Library/Subversion/Repository/MyNewApp/trunk/MyNewApp1
If the import was successful, you should see the long list of added files...
Note: This means that you import the MyNewApp1 (you could use any
name) project to the trunk under svn. The trunk extension is important
because of naming convention used by Xcode too. Again you can include
any comment you want in the quotation marks, but be sure your comment
will be meaningful to anyone using the repository.
4.Add repository in Xcode
Now launch Xcode and go to Preferences --> Accounts and add new repository with the "+" on the left lower corner
+ Add Repository...
Enter the repository address
https://myserver.me.com/Library/Subversion/Repository/MyNewApp
Note: Don't use the trunk etc. you need the root of the repository here!
5.Checkout the project to create a working copy
In Xcode go to Source Control --> Check Out...
Enter the repository address of the trunk (or branches or tags if you used them earlier)
https://myserver.me.com/Library/Subversion/Repository/MyNewApp/trunk
then give the name of the working copy folder and its location
Note: trunk is important!!! Just type it after the root, if you miss it there will be trunk etc. folders in your folder! Directory name is
as you like for example MyNewAppWorking...then choose location on
your computer like Apps_Developing in our case.

Question marks in project navigator Xcode 5

i just updated to Xcode 5 and my project is using GIT, after update completed suddenly question marks appear in project navigator file near each file.
when i am trying to Commit i don't see what files have been changed, i cannot pull also
and when i am trying to push it gives :Push Success" message but the repository on GitHub don't updated.
You probably did not set up your git repository properly. There are ways of adding external git repositories, but they tend not to work well for github (in my experience) and always lead to these sorts of issues.
If you want to set up a remote git repository through github on XCode these are the steps you should take.
Make the repository on github. Make sure to add the .gitignore file for Objective-C.
Clone the repository.
Go to XCode, press "create new project"
Create the project in the folder you cloned the repo to. I always name it the exact same thing, but I don't know if that is necessary.
Make sure not to select create local git repository.
This will definitely create a project that is under version control by a remote git repository hosted on github.
Quick fix is to Create or Save the new project 'outside' the directory (say Desktop) that is not linked to your github/bitbucket

How can I push to bitbucket.org without my project parent directory

I had created a remote repo with bitbucket.org, for example, https://somebody#bitbucket.org/somebody/test.git
When I pushed my local repo to the bitbucket repo by Eclipse EGit, I got all my project files in a parent directory, for example, https://somebody#bitbucket.org/somebody/test.git/Test/XXX. But I only hoped all my project files located in the repo root, for example, https://somebody#bitbucket.org/somebody/test.git/XXXX.
How can I do? Thanks!
eGit converts eclipse project into a folder under your Git repo when you 'share' it. This is the way eGit works, so I don't think what you asking is possible with eGit.
It is better this way IMO because such design allows for several projects in the same Git repository, which is very common.

Resources