When editing the commit message, start the editor with the contents in the given file. After building the state to be committed incrementally with these commands, git commit (without any pathname parameter) is used to record what has been staged so far. This is the most basic form of the command. Environment variables and config files.
This lesson was written for an older version of GitHub Desktop for OS X. Since then, GitHub has released an entirely new version of GitHub Desktop with a significantly different interface. This lesson only refers to the OS X version now known as “GitHub Desktop Classic”. Lesson Goals In this lesson you will be introduced to the basics of version control, understand why it is useful and implement basic version control for a plain text document using GitHub Desktop. By the end of this lesson you should understand: • what version control is and why it can be useful • the differences between Git and GitHub • how to implement version control using ‘GitHub Desktop,’ a Graphical User Interface for GitHub • be aware of other resources that will help you implement version control in your academic writing Software Requirements GitHub Desktop Classic is currently only available for Mac.
![Commands Commands](https://cdn.ttgtmedia.com/ITKE/uploads/blogs.dir/319/files/2018/06/windows-git-config-files-location.jpg)
If you use Linux you will probably already be familiar with the command line and will be able to use the Command Line version of Git. What is Version Control and Why Use It? It is helpful to understand what version control is and why it might be useful for the work you are doing prior to getting stuck into the practicalities. At a basic level version control involves taking ‘snapshots’ of files at different stages. Many people will have introduced some sort of version control systems for files. Often this is done by saving different versions of the files. Something like this.
Mydocument2016-01-06.txt mydocument2016-01-08.txt Though this system might be slightly easier to follow, there are still problems with it. Primarily this system doesn’t record or describe the changes that took place between these two saves. It is possible that some of these changes were small typo fixes but the changes could also have been a major re-write or re-structuring of a document. If you have a change of heart about some of these changes you also need to work out which date the changes were made in order to go back to a previous version. Version control tries to address problems like these by implementing a systematic approach to recording and managing changes in files. At its simplest, version control involves taking ‘snapshots’ of your file at different stages. This snapshot records information about when the snapshot was made but also about what changes occurred between different snapshots.
This allows you to ‘rewind’ your file to an older version. From this basic aim of version control a range of other possibilities are made available. Why Version Control Text Documents? As research increasingly makes use of digital tools and storage it becomes important to consider how to best manage our research data. This becomes especially important when we want to collaborate with other people. Though version control was originally designed for dealing with code there are many benefits to using it to with text documents too.
![Command Command](https://dannguyen.github.io/github-for-portfolios/images/lessons/4/github-mac-download.png)
Though not all of these benefits will be covered in this lesson, version controlling your document allows you to: • Track developments and changes in your documents • Record the changes you made to your document in a way that you will be able to understand later • Experiment with different versions of a document while maintaining the original version • ‘Merge’ two versions of a document and manage conflicts between versions • Revert changes, moving ‘backwards’ through your history to previous versions of your document Version control is particularly useful for facilitating collaboration. One of the original motivations behind version control systems was to allow different people to work on large projects together, in the case of Git to manage the Linux kernel source code.
Using version control to collaborate allows for a greater deal of flexibility and control then many other solutions. As an example it would be possible for two people to work on a document at the same time and then merge these documents. If there were ‘conflicts’ between the two versions version control systems would allow you to see these conflicts and make an active decision about how to ‘merge’ these different versions into a new ‘third’ document. With this approach you would also retain a ‘history’ of the previous version should you wish to revert back to one of these later on. Version control will not be necessary for all of the documents you write. However there are times when version control will be very useful.