Git Product home page Git Product logo

tips's People

Contributors

adityasiwan avatar adrianskar avatar alorma avatar anchal20 avatar ankurk91 avatar arnabnandy7 avatar arrrggghhh avatar david-wobrock avatar denisbalyko avatar edycutjong avatar exalted avatar hemanth avatar javadnikbakht avatar joelgallant avatar lav45 avatar lmarvaud avatar masa-shin avatar munendrasn avatar mvolz avatar nirajpandkar avatar olgabrani avatar p-v avatar phalgun avatar ranhiru avatar rednik96 avatar routinet avatar samarpanda avatar shfshanyue avatar trstringer avatar vinkla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tips's Issues

Add tip for stats

git log --stat is more verbose than git log.
git log --stat gives more info including files added or changed in a commit
It is almost similar to git log but more verbose.
Can this be included as a tip??

Question about how to apply a commit to different version

I have several independent versions, just like ubuntu 14.x, 15.x, 16.x, so that this versions will not be merge.
if I have a commit or hotfix that wants to apply to different versions, how to do with git is the best practice?
such as git cherry-pick git archive git submodule? which can deal with this?
thanks!

Add a new tool?

Hi,
From what I can see, there is no tip talking about rewriting the commit history (authors, messages, dates), which is done with the git-filter-branch command.

This command is really not easy to use, and I don't see how it would be possible to add a one-line tip about that.

However, I have created a tool to help people doing that. You can check it out at git.io/editor, and the github repo is here

Do you think it would be possible to add it in the tools section? Or maybe add it in a tip?

Validate pull requests with Travis

Hello, I wrote a tool that can validate README links (valid URLs, not duplicate). It can be run when someone submits a pull request.

It is currently being used by

Examples

If you are interested, connect this repo to https://travis-ci.org/ and add a .travis.yml file to the project.

See https://github.com/dkhamsing/awesome_bot for options, more information
Feel free to leave a comment πŸ˜„

getting a tip directly from command-line.

Can this be turned into a command-line utility. Something like this.

import json
from pprint import pprint
from sys import argv
from difflib import SequenceMatcher

def similar(a, b):
    return SequenceMatcher(None, a, b).ratio()

if __name__ == '__main__':
    SEARCH = ' '.join(argv[1:])
    DATA = None

    with open('tips.json') as data_file:
        DATA = json.load(data_file)

    MAX = max(DATA, key=lambda x: similar(SEARCH.lower(), x['title'].lower()))
    print(MAX)

Maybe if we get a better string similarity heuristic it would be better something like FuzzyWuzzy. Kindly share your thoughts on it.

Git version

It's seems that some git bash commands are working on my machine and it's absolutely updated...
Can someone tell me why?

Sync with remote, overwrite local changes

Hi there,

The following could be misleading to a novice in GIT:
git fetch origin && git reset --hard origin/master && git clean -f -d

Perhaps this one would suffice:
git fetch origin && git reset --hard HEAD && git clean -f -d

Include a short intro

Just a couple sentences above the TOC that would at least include the git version on which these were tested (see also #47). Many operating systems are pinned on older versions with varying behavior. Ideally each command would have an "added in x.x" clause, but I understand if that's going a bit too far.

Add shortlog

git shortlog is almost similar to git log
Should I add this or leave it since git shortlog is much similar in usage git log??

[Error]git help everyday

git help everyday Command generates error
No manual entry for giteveryday
Is there some dependencies that needs to installed??
Is everyday a git command??
Could you please help in this regard?

error_git

Add explanations and links to related documentation

For ease of memorization and education purposes, some of these tips should have at least short explanations.

Example:

Delete remote branch
    git push origin --delete <remote_branchname>
Alternatives:
    git push origin :<remote_branchname>

The first command is almost obvious: newcomers to git only have to learn that "origin" is the conventional name of a remote repository, and thus it may be different in some cases. But explaining this may be deferred to git's official docs.

The alternative option is confusing for me even though I've been using git professionally for many years. The explanation is as follows:

Deleting References
You can also use the refspec to delete references from the remote server by running something like this:

$ git push origin :topic
Because the refspec is <src>:<dst>, by leaving off the <src> part, this basically says to make the topic branch on the remote nothing, which deletes it.

Or you can use the newer syntax (available since Git v1.7.0):

$ git push origin --delete topic

(from https://git-scm.com/book/en/v2/Git-Internals-The-Refspec)

Having short explanations like this, accompanied by links to related parts of official docs, would prevent a lot of cargo-cult-like behavior many git users are falling into.

Arguably, all this deeper knowledge can be found by reading the official docs but having quick access to only related parts would be very convenient for someone like me, who doesn't start with reading a whole book before trying something, but prefers to learn hands-on, step-by-step.

Incorrect tip "Delete remote branch"

git branch -dr <remote/branch>

This does not actually delete the branch on the remote as the other two commands this is listed as an alternative for do.

Typo

in Update all the submoudles, it should be submodules

CLI for git-tips

The git-tips project is amazing! It was a great idea to make a usable JSON file. So I thought why not harness the tips.json and make a CLI - https://github.com/nirajpandkar/gtip

Further by tinkering the ~/.bashrc file one would be greeted with a new git-tip every time he/she opens the terminal. I think this'll help people to easily learn new git tips and tricks!

Feedbacks/Suggestions/Criticism are welcome πŸ˜„

Still a WIP. Inspired by @jdhitsolutions's Powershell script

Rebase subtree onto new parent

Sometimes you made a mistake and want to attach couple of commits to another branch

aa -- bb -- cc -- dd -- ee
 \ -- ff -- gg
git rebase --onto NEW_BASE OLD_BASE
git rebase --onto gg cc
aa -- bb -- cc
 \ -- ff -- gg -- dd -- ee

translation in other language?

Hi,

I would like to tranlate your tips in Korean.

But I could not find the way of putting translated files.

If you have any policy, let me know.

<!-- @doxie.inject start -->, <!-- @doxie.inject end -->

Hi,
I think this is a bug ❓

tips/README.md

Lines 1089 to 1097 in 8891620

git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | gawk '{ add += <!-- @doxie.inject start -->; subs += <!-- @doxie.inject end -->; loc += <!-- @doxie.inject start --> - <!-- @doxie.inject end --> } END { printf "added lines: %s removed lines: %s total lines: %s
", add, subs, loc }' -
```
__Alternatives:__
```sh
git log --author='_Your_Name_Here_' --pretty=tformat: --numstat | awk '{ add += <!-- @doxie.inject start -->; subs += <!-- @doxie.inject end -->; loc += <!-- @doxie.inject start --> - <!-- @doxie.inject end --> } END { printf "added lines: %s, removed lines: %s, total lines: %s
", add, subs, loc }' - # on Mac OSX

Integrating as a tip of the day

This is a terrific project, especially for IT Pros like myself trying to learn Git. For those people, I created a simple PowerShell script that I run every time I start PowerShell to display a random tip. You can read about it here: http://bit.ly/1OgpK7O

English language error

Its showing in another language when i select English... Isn't it available in English?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.