Edited, memorised or added to reading queue

on 26-Mar-2019 (Tue)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

Flashcard 149626540

Tags
#bloch-effective-java-2ed #java
Question
Programmers assume that if they extend a class and invoke super.clone from the subclass X, the returned object will be an instance of [...].
Answer
the subclass X

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627152

Tags
#bloch-effective-java-2ed #java #java-generics
Question

public interface Comparable<T> {
   int compareTo(T o);
}

The type bound <T extends Comparable<T>> may be read as [...]
Answer
for every type T that can be compared to itself (mutual comparability)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627167

Tags
#bloch-effective-java-2ed #java #java-generics
Question

// Wildcard type for parameter that serves as an E producer - produces Es onto a Stack from external Iterable
public void pushAll(Iterable<...> src) {
  for (E e : src)
    push(e);
}

what kind of bounded wildcard do we need here for Iterable (producer)?
Answer
Iterable<? extends E>

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627180

Tags
#bloch-effective-java-2ed #java #java-generics
Question

// Wildcard type for parameter that serves as an E consumer - it consumes from the Stack to external collection
public void popAll(Collection<...> dst) {
  while (!isEmpty())
    dst.add(pop());
}

what kind of bounded wildcard do we need here for Collection (consumer)?
Answer
Collection<? super E>

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627375

Tags
#bloch-effective-java-2ed #java #java-generics
Question
What does PECS mnemonic stand for?
Answer
producers extend, consumers super - it is about wildcard types

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627386

Tags
#bloch-effective-java-2ed #java #java-generics
Question
Which is a better version?

public static <E> Set<E> union(Set<? extends E> input1, Set<? extends E> input2)  { /* .. */ }

public static <E> Set<? super E> union(Set<? extends E> input1, Set<? extends E> input2) { /* .. */ }

Answer
The first one is better. Do not use wildcard types as return types. Rather than providing additional flexibility for your users, it would force them to use wildcard types in client code.

public static <E> Set<E> union(Set<? extends E> input1, Set<? extends E> input2)  { /* .. */ }


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627401

Tags
#bloch-effective-java-2ed #java #java-generics
Question
If type inference does not work, like here:

public static <E> Set<E> union(Set<? extends E> s1, Set<? extends E> s2) { /* ... */ }

Set<Integer> integers = ... ;
Set<Double> doubles = ... ;
Set<Number> numbers = Union.union(integers, doubles); // does not compile

How can you make the program compile?
Answer
Use explicit type parameter:

Set<Number> numbers = Union.<Number>union(integers, doubles);


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627412

Tags
#bloch-effective-java-2ed #java #java-generics
Question
How would you fix the declaration using PECS rule?
public static <T extends Comparable<T>> T max(List<T> list)
Answer
public static <T extends Comparable<? super T>> T max(List<? extends T> list)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627423

Tags
#bloch-effective-java-2ed #java #java-generics
Question
Comparables are always consumers, so you should always use [...] in preference to Comparable<T>.
Answer
Comparable<? super T>

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627445

Tags
#bloch-effective-java-2ed #java #java-generics
Question
a static method to swap two indexed items in a list:
public static <E> void swap(List<E> list, int i, int j);

How would you write it with a wildcard?
Answer
public static void swap(List<?> list, int i, int j);

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627456

Tags
#bloch-effective-java-2ed #java #java-generics
Question
a static method to swap two indexed items in a list:
public static void swap(List<?> list, int i, int j);

How would you write it with a type parameter?
Answer
public static <E> void swap(List<E> list, int i, int j);

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627490

Tags
#bloch-effective-java-2ed #java #java-generics
Question
When a class literal is passed among methods to communicate both compile-time and runtime type information, it is called a [...]
Answer
type token

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627501

Tags
#bloch-effective-java-2ed #java #java-generics
Question
Class was generified in release 1.5. The type of a class literal is no longer simply Class, but [...], for example object String.class is of type [...]
Answer
Class<T>, Class<String>

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149627992

Tags
#horstmann-java8-for-really-impatient #java #java8 #lambda-expressions
Question

public class Application() {
  public void doWork() {
    Runnable runner = () -> { ...; System.out.println(this.toString()); ... };
    //...
  }
}

Does this in this.toString() refer to Application or Runnable?
Answer
Application

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 150889560

Tags
#java #java-generics
Question
If you need to [what operations?] a list, you need to declare it exactly with no wildcards, e.g. List<Integer>.
Answer
both read from and write to

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
If you need to both read from and write to a list, you need to declare it exactly with no wildcards, e.g. List .






Flashcard 1480007486732

Tags
#horstmann-java8-for-really-impatient #java #java8
Question
Use Arrays.stream(array, from, to) to make stream from a part of
Answer
an array

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Branding Definition
#Branding
First, let's clear up the biggest misconception about brand strategy: Your brand is not your product, your logo, your website, or your name. In truth, your brand is far more encompassing — it defines the visceral and frequently intangible aspects of your company identity.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on




Special Sauce Element
#Branding
A couple of hamburger patties and a slice of cheese on a bun are just that—until you add “special sauce.” Then suddenly it’s a Big Mac: the biggest, best-selling juggernaut in fast food history. So what’s your special sauce? In a world of Whoppers, what makes you a Big Mac? Identifying the “special sauce factor” is the key to building your brand.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on




#Branding

Awareness is not enough. You may be aware of the Rolls Royce brand, but chances are you haven’t bought one. So how valuable is that brand awareness to Rolls Royce or its marketers? Zero. Zip. Nada.

Awareness, unless followed at some point by consideration, intention, and purchase (the typical sales funnel model), is worthless.

Unless you can correlate the awareness you create to purchases people make, you will never understand the ROI of your branding initiatives.

And if you don’t understand the ROI of your own branding initiatives, you’ll never be able to demonstrate their value to executives and other teams at your company

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on




The Villain
#marketing #principle-2-internal-and-external-problems #story-brand #the-villain

Start with the root of all the conflict. The most dynamic, interesting characters in any story: the villain. Every Story Needs a Villain. Position your products and services as weapons they can use to defeat a villain.

It doesn’t have to be a person, but should have personified characteristics. Advertisers personify the problems their customers face in order to capture their imagination and give their frustrations a focal point. Think germs in toothpaste ads.

The more you talk about the villain, the more people will want a tool to help them defeat the villain.

Characteristics that make for a good villain:

  1. The villain should be a root source. Frustration is not a villain. High taxes IS a villain.

  2. The villain should be relatable. People should immediately recognize it when spoken of.

  3. One villain and one villain only. Not many.

  4. The villain should be real. Don't make shit up.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on




Ends in Success
#comunicacion #ends-in-success #marketing #principle-7-tell-people-how-your-brand-changes-them #story-brand #ultímate-self-realization

Ultimate Self-Realization or Acceptance (The Need to Reach Our Potential)

Movies like Legally Blonde, The Theory of Everything, and Whiplash are all about heroes who face great odds in their journey to prove themselves. Once proven, the heroes realize an inner peace and can finally accept themselves because they’ve reached their potential.

An outward demonstration of worth isn’t always necessary to create this kind of resolution. Heroes can also take an internal journey to come to the same conclusion.

When Bridget Jones realized she was too good for the boss with whom she desired a relationship, she came to an ultimate self-realization that returned her to a place of peace and stability. And while it’s true she didn’t close the story loop of uniting with the man she wanted, resolution is brought about as she abandons that goal in exchange for the greater fulfillment of self-acceptance and contentment.

The Dove soap advertising on women being draw by an FBI forensic agent should that. The point: many women don’t realize how beautiful they are.

Ways for a brand to offer a sense of ultimate self-realization and self-acceptance:

  1. Inspiration. If an aspect of your brand can offer or be associated with an inspirational feat, open the floodgates. e.g. HBR, Redbull.
  2. Acceptance.
  3. Trascendence. Invite them to a larger movement. Think FUBU.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

StoryBrand Principle Seven: Never assume people understand how your brand can change their lives. Tell them.
t being able to “fit it all in” is often perceived by our customers as a personal deficiency. Any tool, system, philosophy, or even person who can expand time may offer a sense of completeness. <span>Ultimate Self-Realization or Acceptance (The Need to Reach Our Potential) Movies like Legally Blonde, The Theory of Everything, and Whiplash are all about heroes who face great odds in their journey to prove themselves. Once proven, the heroes realize an inner peace and can finally accept themselves because they’ve reached their potential. An outward demonstration of worth isn’t always necessary to create this kind of resolution. Heroes can also take an internal journey to come to the same conclusion. When Bridget Jones realized she was too good for the boss with whom she desired a relationship, she came to an ultimate self-realization that returned her to a place of peace and stability. And while it’s true she didn’t close the story loop of uniting with the man she wanted, resolution is brought about as she abandons that goal in exchange for the greater fulfillment of self-acceptance and contentment. The Dove soap advertising on women being draw by an FBI forensic agent should that. The point: many women don’t realize how beautiful they are. Ways for a brand to offer a sense of ultimate self-realization and self-acceptance: Inspiration. If an aspect of your brand can offer or be associated with an inspirational feat, open the floodgates. e.g. HBR, Redbull. Acceptance. Trascendence. Invite them to a larger movement. Think FUBU. <span>




StoryBrand Principle Seven: Never assume people understand how your brand can change their lives. Tell them.
#marketing #principle-7-tell-people-how-your-brand-changes-them #resumir #story-brand

KEEP IT SIMPLE

The idea behind the success module in the SB7 Framework is that we offer to close a story loop. Human beings are looking for resolutions to their external, internal, and philosophical problems, and they can achieve this through, among other things, status, self-realization, self-acceptance, and transcendence. If we can help people achieve these things, make this a core aspect of our brand promise.

Offering to close a story loop is much more simple than you think. Even the inclusion of smiley, happy people on your website is a strong way to offer the closing of a story loop. If you sell rugs, a successful resolution might be a beautiful floor or a room that finally feels finished.

The important idea is that we need to show repeatedly how our product or service can make somebody’s life better. If we don’t tell people where we’re taking them, they won’t follow. This is the human desire to transform. Everybody wants to change. Everybody wants to be somebody different, somebody better, or, perhaps, somebody who simply becomes more self-accepting. Brands that participate in the identity transformation of their customers create passionate brand evangelists.

You are helping them become wiser, more equipped, more physically fit, more accepted, and more at peace. Your brand participates in our customers’ transformation.

SMART BRANDS DEFINE AN ASPIRIATIONAL IDENTITY

The aspirational identity of a Gerber Knife customer is that they are tough, adventurous, fearless, action oriented, and competent to do a hard job. Epitomized in their advertising campaign “Hello Trouble,”. Gerber positioned their customer as the kind of person who sails boats into storms, rides bulls, rescues people from floods, and yes, cuts tangled ropes from boat propellers.

HOW DOES YOUR CUSTOMER WANT TO BE DESCRIBED BY OTHERS?

The best way to identify an aspirational identity that our customers may be attracted to is to consider how they want their friends to talk about them. If you offer executive coaching, your clients may want to be seen as competent, generous, and disciplined. Once we know who our customers want to be, we will have language to use in our marketing material.

A GUIDE OFFERS MORE THAN A PRODUCT AND A PLAN

Leaders who care more about changing lives than they do about selling products sell more.

Dave Ramsey and his team at Ramsey Solutions.

What he says on his radio show:

“Welcome back to The Dave Ramsey Show, where debt is dumb, cash is king, and the paid-off home mortgage has taken the place of the BMW as the status symbol of choice.” There they are, the elements of story, complete with an identity to step into and a new status symbol to go along with it.

Dave’s understanding of his listeners’ external problems (consumer debt and financial illiteracy), internal problems (confusion and a feeling of hopelessness), as well as their philosophical problem (accruing debt for things we don’t need posits moral questions) engages listeners in a living story.

GREAT BRANDS OBSESS ABOUT THE TRANSFORMATION OF THEIR CUSTOMERS

After a climactic scene, the guide comes back to affirm the transformation. In Star Wars, the ghost of Obi-Wan stands next to Luke Skywalker as he’s rewarded for bravery. A hero needs somebody else to step into the story to tell them they’re different, they’re better. That somebody is the guide. That somebody is you.

FINANCIAL ADVISOR

  • From: Confused and ill-equipped
  • To: Competent and smart

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on




Ends in Success
#a-character #comunicacion #marketing #principle-7-tell-people-how-your-brand-changes-them #story-brand

In a good story, the resolution must be clearly defined so the audience knows exactly what to hope for. Once you know how your customers’ lives will change after they engage your brand, you will have plenty of copy to use in your marketing collateral.

The success module of your StoryBrand BrandScript should simply be a list of resolutions to your customers’ problems. When we resolve our customers’ internal, external, and philosophical problems, we’ve truly created a resolution that will satisfy their story.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on


Parent (intermediate) annotation

Open it
In a good story, the resolution must be clearly defined so the audience knows exactly what to hope for. Once you know how your customers’ lives will change after they engage your brand, you will have plenty of copy to use in your marketing collateral. The success module of your StoryBrand BrandScript should simply be a list of resolutions to your customers’ problems. When we resolve our customers’ internal, external, and philosophical problems, we’ve truly created a resolution that will satisfy their story. The three dominant ways storytellers end a story is by allowing the hero to: Win some sort of power or position. Be unified with somebody or something that makes them whole. Experience

Original toplevel document

StoryBrand Principle Seven: Never assume people understand how your brand can change their lives. Tell them.
In a good story, the resolution must be clearly defined so the audience knows exactly what to hope for. Once you know how your customers’ lives will change after they engage your brand, you will have plenty of copy to use in your marketing collateral. The success module of your StoryBrand BrandScript should simply be a list of resolutions to your customers’ problems. When we resolve our customers’ internal, external, and philosophical problems, we’ve truly created a resolution that will satisfy their story. The three dominant ways storytellers end a story is by allowing the hero to: Win some sort of power or position. Be unified with somebody or something that makes them whole. Experience some kind of self-realization that also makes them whole. Winning Power and Position (The Need for Status) Offer access. Think Starbucks membership cards. (points and stuff) Create scarcity. Limited number of something or owning something few




Flashcard 3952832285964

Tags
#git
Question
<p>Commit all the files that have been added, with commit message</p>
Answer
git commit -m "Initial commit"

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952834645260

Tags
#git
Question
Adding a remote with example name origin
Answer
git remote add origin https:///owner/repository.git

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952836480268

Tags
#git
Question
Clone repository
Answer

cd [folder]

git clone https://github.com/username/projectname.git


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952838315276

Tags
#git
Question
Clone repository to specific folder
Answer
git clone https://github.com/username/projectname.git MyFolder

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952841723148

Tags
#git
Question
Clone repository to the current folder
Answer
git clone https://github.com/username/projectname.git .

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952844082444

Tags
#git
Question
Clone through ssh
Answer
git clone git@github.com:username/projectname.git

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952846441740

Tags
#git
Question
Create empty repository on the remote server. (Code to run on the remote server)
Answer
git init --bare /path/to/repo.git

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952848801036

Tags
#git
Question
Create empty repository. (Command to run on local machine)
Answer
git remote add origin ssh://username@server:/path/to/repo.git

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952851160332

Tags
#git
Question
Transfer local repository to remote location.
Answer

git push --set-upstream origin master

or

git push -u origin master


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952853519628

Tags
#git
Question
Set username and email - globalne ustawienia
Answer
  • git config --global user.name "Your Name"
  • git config --global user.email mail@example.com

This will store the setting in your user's .gitconfig file: e.g. $HOME/.gitconfig or for Windows, %USERPROFILE%\.gitconfig


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952858238220

Tags
#git
Question
User name and email only for current repository
Answer
  • cd /path/to/my/repo
  • git config user.name "Your Login At Work"
  • git config user.email mail_at_work@example.com

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952860597516

Tags
#git
Question
Remove global identity
Answer
  • git config --global --remove-section user.name
  • git config --global --remove-section user.email

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952862956812

Tags
#git
Question
To force git to look for your identity only within a repository's settings, not in the global config:
Answer
git config --global user.useConfigOnly true

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952886025484

Tags
#git
Question
Check remotes names
Answer
git remote -v

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952888384780

Tags
#git
Question
Set the url for remote upstream
Answer
git remote set-url upstream https://github.com/projectusername/repo.git

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952890744076

Tags
#git
Question
Add remote
Answer

$ git remote add upstream https://github.com/projectusername/repo.git

$ git remote add dave https://github.com/dave/repo.git


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952898084108

Tags
#git
Question
Show help for command
Answer
git checkout -h

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952936619276

Tags
#git
Question
Browse history
Answer
git log

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952938978572

Tags
#git
Question
History in one line and graph
Answer
git log --decorate --oneline --graph

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952941337868

Tags
#git
Question
Assign alias
Answer

git config --global alias.lol "log --decorate --oneline --graph"

$ git lol

$git lol HEAD develop origin/master (active branch HEAD, develop and origin/master branches

$git lol -all (combined history of everything)


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952945270028

Question
Limit logs
Answer
git log -2 --oneline

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952947629324

Tags
#git
Question
Search log for string (regexp)
Answer

git log -S<string>

Look for differences that change the number of occurrences of the specified string (i.e. addition/deletion) in a file. Intended for the scripter’s use.

It is useful when you’re looking for an exact block of code (like a struct), and want to know the history of that block since it first came into being: use the feature iteratively to feed the interesting block in the preimage back into
-S, and keep going until you get the very first version of the block.


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952950775052

Tags
#git
Question
Look for differences whose patch text contains added/removed lines that match <regex>
Answer

git log -G<regex>


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952952610060

Tags
#git
Question
Group commits by author
Answer
git shortlog

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952954969356

Tags
#git
Question
Search in commit messages
Answer
git log [options] --grep "search_string"

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952957328652

Tags
#git
Question
Search in commit messages - inverted
Answer
git log --grep="add file" --invert-grep

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952983280908

Tags
#git
Question
Search logs after date
Answer
git log --after 2016-05-01

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952985640204

Tags
#git
Question
Filtrowanie logów po autorze
Answer
git log --author=author

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952987999500

Tags
#git
Question
View single commit
Answer
git show 48c83b3

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952990358796

Tags
#git
Question
Remove remote branch
Answer
git push [remote-name] --delete [branch-name]

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952992718092

Tags
#git
Question
Change origin url
Answer

git remote set-url origin https://github.com/username/repo2.git

# Change the 'origin' remote's URL


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952996125964

Tags
#git
Question
List all the existing remotes associated with this repository
Answer
git remote

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3952997960972

Tags
#git
Question
List all the existing remotes associated with this repository with details
Answer
git remote -v

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953001368844

Tags
#git
Question
To prune deleted branches from all remotes
Answer
git fetch --all --prune

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953004252428

Tags
#git
Question
The pull command combines
Answer

Git fetch remote-name

git merge remote-name/branch-name


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953007136012

Tags
#git
Question
git pull --rebase remote-name branch-name
Answer
The pull with --rebase flag command combines a fetch and a rebase instead of merge

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953013689612

Tags
#git
Question
You can create a new branch and switch to it using
Answer
git checkout -b <branch-name>

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953016048908

Tags
#git
Question
Adds remote git repository represented by git-repository-url as new remote named upstream to the git repository
Answer
git remote add upstream git-repository-url

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Branding ROI
#Branding
Unless you can correlate the awareness you create to purchases people make, you will never understand the ROI of your branding initiatives.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on




Flashcard 3953018932492

Tags
#git
Question
After you use git checkout to create a new branch, you will need to set that upstream origin to push to using
Answer
git push --set-upstream origin <branch-name>

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953879813388

Tags
#git
Question
Syntax for pushing to a remote branch
Answer

git push <remote_name> <branch_name>

Example: git push origin master


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953882172684

Tags
#git
Question
Rename remote
Answer

git remote rename origin destination

# Change remote name from 'origin' to 'destination'


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953884531980

Tags
#git
Question
You can change the url of an existing remote by the command
Answer
git remote set-url remote-name url

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953886891276

Tags
#git
Question
Staging All Changes to Files
Answer

git add -A

Version ≥ 2.0

git add .


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953889250572

Tags
#git
Question
Unstage a file that contains changes
Answer
git reset

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953891609868

Tags
#git
Question
Interactive add
Answer

git add -i (or --interactive)

will give you an interactive interface where you can edit the index, to prepare what you want to have in the next commit. You can add and remove changes to whole files, add untracked files and remove files from being tracked, but also select subsection of changes to put in the index, by selecting chunks of changes to be added, splitting those chunks, or even editing the diff.


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953893969164

Tags
#git
Question
Staging A Single File
Answer
git add <file path>

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953896328460

Tags
#git
Question
Stage deleted files
Answer
git rm filename

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 3953898687756

Tags
#git
Question
To delete the file from git without removing it from disk
Answer
git rm --cached filename

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs