1

First post. I tried researching my issue but I couldn't find a definitive answer. It's to do with Git which I'm learning and prototyping at work.

We'll eventually add our source and then start development using it and we'll do the usual commits, that sort of thing. At some point we'll mark the completed product using a tag, say 1.0. The development process will carry on and maybe we'll tag, say 1.9 at a future date. I think that's the approach we need to follow?

If it is, let's say a customer phones in and says there's a problem in 1.6 which worked in 1.4. What we'd think of doing is somehow getting all the code out of Git for version 1.4 and version 1.6. We could then run both folders in BeyondCompare's diffing tool, that type of thing. Also, if we get everything out for version 1.6 we could test it.

If you think that tags is the correct approach, then can someone advise me as to which Git command will let me go back in time and get everything that was tagged at the point in time?

7
  • You don't need an external diffing tool git already IS a glorified diff tool e.g. git diff tag1..tag2 - I suggest general background reading on how to use git and using git before on a trial project. Yes tags are the right approach (though a tag is just an alias for a given commit). Commented Aug 6, 2015 at 14:23
  • 2
    You can use git checkout <tag> to checkout exactly the source that made up that tag. Also note that if something worked in 1.4 and is broken in 1.6, you can use git bisect to narrow the bug down to one commit instead of diffing the whole world Commented Aug 6, 2015 at 14:23
  • I'm voting to close this question as off-topic because you don't have anything resembling a programming question. Maybe it would fit on Programmers.SE? Commented Aug 6, 2015 at 14:25
  • @Useless ~~While almost certainly a duplicate of something~~ (it IS a duplicate of multiple questions), it's definitely about software tools commonly used by programmers. Commented Aug 6, 2015 at 14:28
  • possible duplicate of How to use Git? Commented Aug 6, 2015 at 14:29

1 Answer 1

3

Tags should be used to mark specific versions of your software, like a release; you can alway "go back" to a specific tag by using the command

git checkout <tag name>

I suggest you to read this guide about tagging and this guide about branching and tagging.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.