3

We all know that How much the Backup of the project is vital in the programming, when specially you are making a major changes in your code to experiment something new. But eventually you came across to fact that last changes that you have made earlier were correct. Or sometimes you just messed up your whole project. So there must be Backup of project for that.

So Do you know a way to take a local backup into other location of your machine as we know mySql , Visual studio do. I know only a single way and that is to just copy the project from project explorer and and past it some where else.

Do you know any other way of taking such type of back up. (I do not want to take back up over the internet. Thanks)

2
  • 2
    local git(svn, add your preffered version control system here) repo ...
    – Selvin
    Commented Apr 3, 2015 at 13:16
  • 1
    "We all know that How much the Backup of the project is vital in the programming" -A huge issue in the 90's I'm sure. Today, not so much. Recommend using git.
    – Eric S.
    Commented Apr 3, 2015 at 13:35

4 Answers 4

3

Android studio is powered by Intellij and it has inbuilt support for Local History.

Local History, which is your personal real-time version control system. Local History is independent of external version control systems and works with the directories of your project even when they are not under any VCS control.

Local history is cleared when you install a new version of IntelliJ IDEA or when you invalidate caches. Therefore, check in the changes to your version control system before performing these operations.

Source - official IntlliJ documentation

Detailed description of Local Hostory feature here

Local History is independent of external version control systems and works with the directories of your project even when they are not under any VCS control. It applies to any structural artifacts: a project, a directory or package, a file, a class, class members, tags, or selected fragment of text.

Unlike usual version control systems, Local History is intended for your personal use, it does not support shared access.

With Local History, IntelliJ IDEA automatically tracks changes you make to the source code, results of refactoring, and state of the source code based on a set of predefined events (testing, deployment, commit or update).

Local History revisions are marked with labels, which are similar to versions in traditional version control systems. Labels based on predefined events are added to the local revisions automatically; besides that, you can put your own labels to the project artifacts to mark your changes. Reverting or viewing differences are performed against these labels.

0

As showed in the comments, you can use git local. Once started git in your repository you can make all the changes and commits, create branches, tags and everything useful to control the versions of your application.

More info see: Git Basics - Getting a Git Repository

0

One way how you can take backup of all the code is using GIT as mentioned above, in one more answer, I found these steps very useful -

it will generate a zip file of the project resources -

git init       # on the root of the project folder
git add .      # note: android studio already created .gitignore
git commit -m 'ready to zip sources'
git archive HEAD --format=zip > d:/archive.zip

Note: If you intend to send this by email, you have to remove gradlew.bat from zip file.

Reference answer

0

From experience, GitHub has been the best option. But remember, saving code only is not the safest way. Never forget your Keystore!!! Without it, you can never update a package on the store, you will lose all billing licenses and Firebase tools...the list is endless.

In short, GitHub your code, and manually back up that keystore file.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.