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 trial

WordPress

Andrew Showalter
Andrew Showalter
14,028 Points

GIT | How to view in a browser different versions / branches in a repository

Before I get crazy into modifying some code in a wordpress theme I am building, I want to be able to view the changes on a specific branch I am creating in a web browser from my development environment. Is this possible? If so, what is the best method.

2 Answers

Andrew Showalter
Andrew Showalter
14,028 Points

Nope. I figured out the answer to my own question. This is what makes GIT so amazing that I didn't realize even as I was taking the course. So, you have your master branch, and then you create a new branch to make some changes. You make some edits and make some commits, and as long as you have that branched checked out in GIT, you will see the changes in the browser. If you want to go back to seeing the master branch in the browser, just checkout the master branch and you are good to go. So powerful and such an amazing tool I cannot figure out why I didn't start using it earlier.

Colin Marshall
Colin Marshall
32,861 Points

Ahhh I see what you meant now. I thought you meant you wanted to see the differences in the code between the branches in the browser.

I just learned it too and am equally impressed by it. It was really confusing at first but after I took the Treehouse course it all came together. No more keep multiple versions of a project in separate folders. No more accidentally deleting things and losing them forever. So amazing!

Colin Marshall
Colin Marshall
32,861 Points

I'm sure you could do this by putting your repository on github or bitbucket.