Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTammi Caprio
11,262 PointsHow would you go about utilizing Git while working on files outside of terminal in a text editor like Coda 2 or Sublime?
The Git basics course goes into using nano to edit files, but this is clearly not the simplest or most efficient way as it doesn't have the features of a text editor.
1 Answer
Andrew Chappell
12,782 PointsFirst thing you would do is navigate to the folder you are working in your computers terminal. For example it might look like this:
cd ~/your-directory
If you haven't done so already you would need to initialise this folder as a git repository.
git init
Then you just work on your files in sublime text as normal. Maybe you have been working on the header of your site you might finish doing that and that would be a good time to commit your changes. So you would run.
git add .
this adds it to the staging environment. Then you would commit it.
git commit -m "Finished working on the header"
There's more to it than that but that's the basic idea.
Tammi Caprio
11,262 PointsTammi Caprio
11,262 PointsThank you, Andrew! This is helpful.