Git for version controlling Android project

For some mysterious reasons, I ended up deleting my local repository. I now cloned my remote repo back into my Eclipse workspace and it shows that I am working on the master branch of my Android project rather than the local repo and it makes sense.

The reason why I started using Git is so that I can make wild changes to the project and if anything breaks, I can go back to the last stable state. Now, with a local repo gone and me working straight on my master branch of the project, I do not know how that can be done.

  • “Error:(22, 0) CreateProcess error=2, The system cannot find the file specified” how to use git command in build.gradle
  • Intraweb HTML5 app, git and database - do they blend?
  • Delete Folder from gitHub through eclipse
  • Developing two versions of the same app in Android Studio
  • How to Import Module without creating copy in Android Studio
  • Gitignore not ignoring some build files in Android library
  • Please tell me how that can be done.

    PS: I need to have Android project in my workspace or else Eclipse starts complaining cause it cannot find user libraries

  • GitHub workflow: Should each developer have their own fork?
  • How should I keep my git project branch up to date with master?
  • Deploying multiple applications into a single tree with Capistrano and Git
  • Handling line endings for git
  • Git repository on server is much bigger than local clone with all branches
  • should I use tags or branches? Which is better for tracking your source code in Git of every nightly build with Jenkins
  • 2 Solutions collect form web for “Git for version controlling Android project”

    If you cloned the remote repo back into your workspace, you have a local repo once more.
    And you can always create new branches for your wild changes instead of working directly on the master branch.

    You can make brach say masterbranch and dev barch : master brach means most stable code is in , dev brach means after any changes u willing to take backup u can push to dev brach and dont push to master until and unless u r sure of it.

    Create local brach

    git checkout -b your_branch
    

    Push it to the remote server.

    git push <remote-name> <branch-name>
    
    Git Baby is a git and github fan, let's start git clone.