I am using GIT in my Android project for version control, also I am using terminal provided in IDE to execute all the GIT related commands like add, commit , push etc. I created a new branch using
git checkout -b dev
git checkout master
commit changes in new branch and then move to previous branch. After
checkout -b dev you are in new branch. Edit your files and commit changes. These changes will be committed to new branch and then go to you
master branch to see same file with old snapshot.