git reset --soft HEAD^
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
<!-- Drop Shadow Stack --> | |
<item> | |
<shape> | |
<padding | |
android:bottom="1dp" | |
android:left="1dp" | |
android:right="1dp" |
This is essentially important when switching form either HTTPS TO SSH or vice-versa
To view all files in your project that are ignored by Git without looking into .gitignore
file, run the command below
git ls-files --others --ignored --exclude-standard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import java.io.File; | |
public class CacheManager { | |
/** | |
* Private Constructor to make this a Utility class. | |
*/ | |
private CacheManager() { | |
// Private constructor |
Description
Cherry picking in Git means to choose a commit from one branch and apply it onto another. This is in contrast with other ways such as merge and rebase which normally apply many commits onto another branch.
Usage
Make sure you are on the branch you want to apply the commit to.
git checkout master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testTeachersAreDisplayed() throws IOException { | |
/** | |
* Setting up mockWebServer at localhost:9900. | |
*/ | |
MockWebServer server = new MockWebServer(); | |
// start the server at port 9900 | |
server.start(9900); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jxw.graphql; | |
import android.support.test.InstrumentationRegistry; | |
import android.support.test.espresso.IdlingRegistry; | |
import android.support.test.espresso.idling.CountingIdlingResource; | |
import android.support.test.runner.AndroidJUnit4; | |
import android.support.test.rule.ActivityTestRule; | |
import com.jxw.graphql.test_utils.TestDemoApplication; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jxw.graphql.test_utils; | |
import android.app.Application; | |
import android.content.Context; | |
import android.support.test.runner.AndroidJUnitRunner; | |
public class CustomTestRunner extends AndroidJUnitRunner { | |
@Override | |
public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { | |
return super.newApplication(cl, TestDemoApplication.class.getName(), context); |