![]() ![]() You can work at a lower or higher scope than this, but I belive working with individual logical changes as individual changes allows you to get the most from your repository. That would go into its own changeset and that changeset would be committed to the repository. Another changeset could be the creation of a new class to represent ‘xyz’. You would commit all the file modifications to complete this change as a single changeset. So, for example, if you codebase is a command line tool, a possible changeset would be adding the ability to specify an output directory. The idea here is that each changeset should optimally contain changes for a single logical modification to your code. A changeset is commited to the git repository to track the changes. A changeset can include adding / removing text inside a file and / or adding / removing entire files. Git works with groups of changes to your files, which we will call changesets. You Commit Changesets to a Git repository Here’s a quick rundown of the basic points on how Git operates. Ok, that takes care of most of the setup stuff. gitignore file later # and each git project also can have its own # specific. Git config -global core.excludesfile ~/.gitignore # add some files patterns to ignore echo " \*. gitignore in home directory touch ~/.gitignore Git config -global user.email Turn on color for your git output git config -global color.ui true Add global gitignore file for temporary files # create. Set your get name and email git config -global user.name "Jim Somebody" We will just execute these commands without too much explanation as to the details of what they do. There are a few steps that are good to take care of up front, to avoid frustrations later on. Git is already installed on your system.Hopefully I can show that even with just a minimal amount of overhead, Git can be an valuable tool. I think it can be hard to prove that the added benefit you get from a version control system is worth the effort it takes to use it. Keep working (and maintaining a history of your work) no matter where you are. ![]() A quick place to share code with yourself on multiple computers.Provide a backup of your source code for when your harddrive crashes.Easily share code in a consistent, familiar manner.What a central Git repository (like Github) gives you Useful for when you need to know if a bug / feature was present in the code at version x. ![]()
0 Comments
Leave a Reply. |