I have cloned a repository in GitHub to my windows GitHub program. But I see lots of files that are "deleted". I do not want to see them, how to hide them?
When a file is shown as 'deleted' in GitHub for windows, the application is trying to tell you that you've deleted a certain file since you've cloned the repository.
You can't hide the files coming up as 'deleted', as they're changes that need to be committed, however, you can untick the files by clicking the checkbox next to the file name in GitHub for windows, which will stop you committing the deleted files to the Git repository.
In future, if you wish to stop changes that have been made to a specific folder or file type from appearing in GitHub for windows, you can add a .gitignore file to the root directory of the Git repository, with the file extensions and folder names of the files you want to ignore. More information about gitignore files can be found at https://help.github.com/articles/ignoring-files
Related
I'm creating an application in swift, when I'm trying to push the application to GitHub it seems to add "derivedData" etc, which I do not want to be added in the git.
I've tried to look around for the .gitignore file but cannot find it anywhere.
Do I've to create a new .gitignore file? How and where should I place this? What should be ignored? If not, where can I find the file?
I'm tried to look around for this for hours but still no success. So I had to ask you guys for the solution of this.
Thanks.
Files that start with a dot are hidden in the Finder by default. Press Cmd-Shift-Dot in the Finder to see hidden files and folders.
If you need to create a .gitignore file, go to gitignore.io. Enter Xcode in the search field and click the Create button. A .gitignore file will be created for you. Copy the contents into a file in a text editor and save the file as .gitignore. Add the .gitignore file to your project folder. You can find more detailed information in the following article:
Telling Git to Ignore Files in Xcode Projects
To avoid having to create a .gitignore file for each Xcode project you create, you can create a global .gitignore file. Name the file .gitignore_global and place it in your user home folder.
When I start a new project with GitHub I always struggle with the same issue. When I create a GitHub project it's already prepopulated with some files (.gitignore, LICENSE, README.md) and hence with an initial commit. I explicitly choose to add these items so I don't have to care about writing them myself.
On the other side, when I start a new Xcode project it works in a very similar way: Xcode creates an initial commit with some files. So when I'm trying to pull my GitHub repo I always have to deal with Git refusing to merge unrelated histories problem.
Is there a correct workflow for this?
Here is the easy way to do this, assuming that you are using a recent Xcode, e.g. 11.2...
create new repository in GitHub, checking .gitignore file and README.md file options
copy repository URL from browser's address field
create new project in Xcode, checking local git repository option
right click Remotes in project's source control navigator to add remote, using URL copied earlier, suffixed with .git
select Fetch and Refresh Status from Source Control menu
select Pull from Source Control menu, from origin/master remote (.gitignore and README.md files are now in your local repository... if in Finder, use Command Shift . to toggle hidden files display)
select Push from Source Control menu, to origin/master remote (Xcode project files are now in your GitHub repository)
Voila! You have set up a new project in Xcode and GitHub in less than a minute.
Just came across the same issue. It actually works on Xcode 11, if you follow these steps:
Create the repository on GitHub including initial branches, License, Readme.md etc.
At the Welcome screen of Xcode choose "Clone an existing project"
Clone your repository into the desired directory (usually a subdirectory of XCodeWorkspaces)
Close Xcode and reopen to get back to the Welcome Screen (that's the trick)
This time choose "Create a new Xcode project"
Place the project into the cloned directory. Xcode automatically picks up, that this directory is already under Git control.
You'll see that the initial files are marked with A and M in the Xcode project navigator
In the menu "Source Control" choose "Commit". You should see all files created by Xcode. Make sure to activate on "Push to remote:" and choose the right branch. Press Commit
If nobody committed or changed on GitHub between step 1 and step 7, it'll work. Check on GitHub.
I followed the instructions in this Microsoft article, but they don't work.
I created .tfignore file, put it in the root, here its content (I want to exclude these folders).
When I open Team Explorer - Pending Changes, I see these folders are included in Pending Changes
A way to solve the issue is updating your VS to VS2015Update 3. The .tfignore should be indeed working correctly.
If those files already in the pending changes before you add your .tfigonre file in source control. You can try below solution:
If the changes are "still" in pending changes, first create a backup
copy, then make an Undo on them. Close VS, restore the backup copies
and then it should work.
Or you can try to use a temporary quick fix for the problem:
Add an $ char into the bower_components folder name in the .bowerrc. TFS does not allow the $ character in the file name, so it can't be added to source control.
More detail ways you can refer this blog from GitHub: Things in ".tfignore" still are shown in pending changes
I am working on an Xcode project with a few other developers. I would like to know if there is a way that I can update only specific files of an xcode project so that I'll only make changes to those classes anytime I synchronize the project in dropbox.
Short answer: No, Dropbox doesn't do that.
You should still be able to use Dropbox source control. Here's how.
Create your project using Git in Xcode. Save the project outside of your Dropbox folder.
Copy your project from the original location into Dropbox (you now have 2 copies).
Open the original project (the one outside Dropbox) in Xcode.
Open up the Organizer and go to Repositories.
Click on "Remote" section of your project.
Click the "Add Remote" button.
Fill in the location field using file:// and the directory path the one in Dropbox
Now just push and pull changes to the remote repository as needed.
Just because you can do it though... doesn't mean you should. You get a free account from ProjectLocker which includes Git repositories and bug tracking software. It is still your private data, with full permission sets for access.
I have some project saved in starteam. As there are a lot of obsolete files I can't check in or check out all project, only changed files. Now I copy project from one computer to another for other developer. I expect starteam treats copied project as new item for check in and check out, but it don't.
Forexample:
I modified file on first computer.
I update list of files on second computer and see this file in "check in" list, as I modified it on second computer.
It is incorrect.
I think there is some configuration file or something like, that saves computer (or user) settings. So when project is copied, settings is copied too.
Do anybody know how to change this configuration to set copied project as new instance of starteam???
You should be able to Right-Click on either the file or a close group of files (such as the Modified group) on the file tab within a project and choose the Update Status option. This will cause StarTeam to analyze the file to try to determine if they truly are the same as what is in source control. Then you can refresh the list and it should change most of your files to current.
There is also a configuration setting under Tools->Personal Options->File tab that is "Use file checksums (MD5) to calculate status". This may be useful to you as a different way to have StarTeam determine if the file on your local disk is the same as what is in source control.
It sounds like you are using a custom filter/query for your check-in list. The status for the files that are copied/moved would be "unknown" and they can still be checked-in by checking the "force check-in" checkbox in the check-in dialog. Just verify that the local version is correct by using compare contents before committing it.
You can try switching from a central file status repository to a "per folder" repository. This will create .sbas folders wherever you check-out files and should maintain status for local files when their containing folder is copied or moved. Look under Tools, Personal Options on the File tab under Repository.