when you get code from git that was uploaded from a unix system they will only have an LF. In windows a line is represented with a carriage return (CR) and a line feed (LF) thus (CRLF). In Unix systems the end of a line is represented with a line feed (LF). The file will have its original line endings in your working directory Warning: LF will be replaced by CRLF in ansible.cfg. That will store the updated version of the file(s) in the Git repository (which is a hidden folder inside your chosen project folder).While using git add command I was receiving below error. Select these modified file(s) and press "Commit" again. It should now list at least one file that's marked as "Modified" in the "Working Tree State" column. With that, Git is set up to manage your project.Īs a test, make a little change to your project, e.g. This empty list tells you that there's nothing changed in your project that needs to be committed to the Git repository. After a few seconds, SmartGit should show an empty list (provided you've unchcked the View option for "Unchanged Files"). Enter something like "initial version" and press "Commit". A dialog window opens in which you can enter a description. Then press the "Commit" button in the window's toolbar. To commit them, simply select all files (to see all files, first select the top folder in the left pane, and also make sure you've checked the "View Files from Subdirectories" option). Lastly, you need to commit these files to Git's repository so that Git learns the initial version of these files, letting it track any changes to them thereafter. That'll be your source files (ending in ".rbp", ".xml", ".rbvcp", ".rbbas" etc.) and maybe other files such as documentation, images and even plugins (I usually store any used plugins along with each project so that I know which plugins are used by which project). This will be convenient later if you choose to share the git project.Įventually you should only have those files listed of which you want to record updated versions. I suggest not to include the ".gitignore" in the ignored items so that it gets version controlled as well. You should now tell Git to ignore all those items you do not need to version controlled by selecting either the entire folder or single files, and then choose from the menu "Local" -> "Ignore". The listing will probably contain a lot of files and folder you do not want to manage as revisions, such as the built application and maybe a Build folder. Now SmartGit shows you a window for the new project, with a left pane containing the folder tree and a right pane showing the files in the selected folder. Next you get to name your project as it'll appear in SmartGit.You'll be asked: "Should a Git working tree be initialized?".Once you've chosen the "Git Working Tree" folder, press "Continue".button to choose the folder which contains your project files and all other files that you want to keep revisions of. Launch SmartGit, then choose from the menu: Project -> Open Working Tree.The RBP and XML formats support storing individual classes in separate locations on disk, allowing you to share the same project items (classes etc.) between multiple projects. Why choose the RBP or XML formats at all? Here, Arbed can be used to display the differences in a way that's even better than what you'll get with the VCP format. If you choose to use the other formats, however, seeing differences becomes difficult. You do not even need to consider using Arbed, as the files are already in a well-readable text format that allows you to see differences between revisions fairly well - though Arbed will still be able to show you (and filter) the changes better than a plain text diff tool ever can. If you use the VCP format, things are straight-forward. Use the "RBP" or "XML" formats, where Real Studion stores the entire project (apart from external items) in a single file with its names ending in ".rbp" or ".xml".Use the "VCP" format, where Real Studio stores each class as a text file, mostly ending in ".rbbas".You can go two ways to store your projects for use with Git (or SVN): Setting up SmartGit to store your projects Choosing the right format
0 Comments
Leave a Reply. |