17 private links
-
Generate SSH key:
$ ssh-keygen -t rsa -C <email1@example.com>
-
Generate
another SSH key
:$ ssh-keygen -t rsa -f ~/.ssh/accountB -C <email2@example.com>
Now, two public keys (id_rsa.pub, accountB.pub) should be exists in the
~/.ssh/
directory.$ ls -l ~/.ssh # see the files of '~/.ssh/' directory
-
Create config file
~/.ssh/config
with the following contents:$ nano ~/.ssh/config Host bitbucket.org User git Hostname bitbucket.org PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa Host bitbucket-accountB User git Hostname bitbucket.org PreferredAuthentications publickey IdentitiesOnly yes IdentityFile ~/.ssh/accountB
-
Clone from
default
account.$ git clone git@bitbucket.org:username/project.git
-
Clone from
accountB
account.$ git clone git@bitbucket-accountB:username/project.git
If you need to manage multiple projects within a single repository, you can use a subtree merge to handle all the references.
Typically, a subtree merge is used to contain a repository within a repository. The "subrepository" is stored in a folder of the main repository.
The best way to explain subtree merges is to show by example. We will:
Make an empty repository called test that represents our project
Merge another repository into it as a subtree called Spoon-Knife.
The test project will use that subproject as if it were part of the same repository.
Fetch updates from Spoon-Knife into our test project.
Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.
git archive -o f83a9df9.tar.gz HEAD $(git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT f83a9df9 bd1773dd)
Magit is an interface to the version control system Git, implemented as an Emacs package. Magit aspires to be a complete Git porcelain. While we cannot (yet) claim that Magit wraps and improves upon each and every Git command, it is complete enough to allow even experienced Git users to perform almost all of their daily version control tasks directly from within Emacs. While many fine Git clients exist, only Magit and Git itself deserve to be called porcelains.
wo of the most common programming tools are way too useful to be left to the programmers. We'll cover how to use the Git version control system and the Make utility to get more accurate and faster results on a variety of common tasks.
Edit files in Markdown format, while you collaborate with users who run Microsoft Word--you can have diffs, while they can use their "DOCX" format and "Track Changes" functionality.
"Win" National Novel Writing Month with the help of Git hooks--a handy way to set up programs to assist you with word count and spelling.
Do double-entry accounting for a small business, and generate financial statements in HTML.
Keep your files consistent across multiple in-house and/or cloud servers, even if all servers are accepting a push at the same time.
And you don't have to keep typing "make" -- we'll cover a simple way to re-run your task when anything changes, and have the result automatically refresh in your browser.
Don Marti presented a talk where he describes how he uses make, git, and other tools for work other than software development. His primary example use case was document processing, but he noted the applicability of the tools to other scenarios.
$ git-stats --help
Usage: git-stats [options]
Options:
-s, --since <date> Optional start date.
-u, --until <date> Optional end date.
-n, --no-ansi Forces the tool not to use ANSI styles.
-l, --light Enables the light theme.
-a, --authors Shows a pie chart with the author related
contributions in the current repository.
-g, --global-activity Shows global activity calendar in the current
repository.
-d, --data <path> Sets a custom data store file.
-f, --first-day <day> Sets the first day of the week.
--record <data> Records a new commit. Don't use this unless you
are a mad scientist. If you are a developer, just
use this option as part of the module.
-r, --raw Outputs a dump of the raw JSON data.
-h, --help Displays this help.
-v, --version Displays version information.
Examples:
git-stats # Default behavior (stats in the last year)
git-stats -l # Light mode
git-stats -s '1 January 2012' # All the commits from 1 January 2012 to now
git-stats -s '1 January 2012' -u '31 December 2012' # All the commits from 2012
Your commit history is kept in ~/.git-stats by default. You can create ~/.git-stats-config.json to specify different defaults.
Documentation can be found at https://github.com/IonicaBizau/git-stats