Software: Apache/2.2.22 (Debian). PHP/5.6.36 uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) Safe-mode: OFF (not secure) /usr/share/doc/libav-tools/html/ drwxr-xr-x |
Viewing file: Select action/file-type: Using git to develop LibavTable of Contents
1. IntroductionThis document aims in giving some quick references on a set of useful git commands. You should always use the extensive and detailed documentation provided directly by git:
shows you the available subcommands,
shows information about the subcommand <command>. Additional information could be found on the Git Reference website For more information about the Git project, visit the Consult these resources whenever you have problems, they are quite exhaustive. What follows now is a basic introduction to Git and some Libav-specific guidelines to ease the contribution to the project 2. Basics Usage2.1 Get GITYou can get git from http://git-scm.com/ Most distribution and operating system provide a package for it. 2.2 Cloning the source tree
This will put the Libav sources into the directory <target>.
This will put the Libav sources into the directory <target> and let you push back your changes to the remote repository. 2.3 Updating the source tree to the latest revision
pulls in the latest changes from the tracked branch. The tracked branch can be remote. By default the master branch tracks the branch master in the remote origin. Since merge commits are forbidden 2.4 Rebasing your local branches
fetches the changes from the main repository and replays your local commits over it. This is required to keep all your local changes at the top of Libav’s master tree. The master tree will reject pushes with merge commits. 2.5 Adding/removing files/directories
GIT needs to get notified of all changes you make to your working directory that makes files appear or disappear. Line moves across files are automatically tracked. 2.6 Showing modifications
will show all local modifications in your working directory as unified diff. 2.7 Inspecting the changelog
You may also use the graphical tools like gitview or gitk or the web interface available at http://git.libav.org/ 2.8 Checking source tree status
detects all the changes you made and lists what actions will be taken in case of a commit (additions, modifications, deletions, etc.). 2.9 Committing
to double check your changes before committing them to avoid trouble later on. All experienced developers do this on each and every commit, no matter how small. Every one of them has been saved from looking like a fool by this many times. It’s very easy for stray debug output or cosmetic modifications to slip in, please avoid problems through this extra level of scrutiny. For cosmetics-only commits you should get (almost) empty output from
Also check the output of
to make sure you don’t have untracked files or deletions.
Make sure you have told git your name and email address
Use –global to set the global configuration for all your git checkouts. Git will select the changes to the files for commit. Optionally you can use the interactive or the patch mode to select hunk by hunk what should be added to the commit.
Git will commit the selected changes to your current local branch. You will be prompted for a log message in an editor, which is either set in your personal configuration file through
or set by one of the following environment variables: GIT_EDITOR, VISUAL or EDITOR. Log messages should be concise but descriptive. Explain why you made a change, what you did will be obvious from the changes themselves most of the time. Saying just "bug fix" or "10l" is bad. Remember that people of varying skill levels look at and educate themselves while reading through your code. Don’t include filenames in log messages, Git provides that information. Possibly make the commit message have a terse, descriptive first line, an empty line and then a full description. The first line will be used to name the patch by git format-patch. 2.10 Preparing a patchset
will generate a set of patches for each commit between <commit> and current HEAD. E.g.
will generate patches for all commits on current branch which are not present in upstream. A useful shortcut is also
which will generate patches from last n commits. By default the patches are created in the current directory. 2.11 Sending patches for review
will send the patches created by 2.12 Renaming/moving/copying files or contents of filesGit automatically tracks such changes, making those normal commits.
3. Libav specific3.1 Reverting broken commits
allows to amend the last commit details quickly.
will replay local commits over the main repository allowing to edit, merge or remove some of them in the process.
3.2 Pushing changes to remote trees
Will push the changes to the default remote (origin). Git will prevent you from pushing changes if the local and remote trees are out of sync. Refer to and to sync the local tree.
Will add additional remote with a name reference, it is useful if you want to push your local branch for review on a remote host.
Will push the changes to the <remote> repository.
Omitting <refspec> makes 3.3 Finding a specific svn revisionSince version 1.7.1 git supports :/foo syntax for specifying commits based on a regular expression. see man gitrevisions
will show the svn changeset r23456. With older git versions searching in
the
or for git < 1.7.1 with
where $SHA1 is the commit hash from the 4. Server IssuesContact the project admins git@libav.org if you have technical problems with the GIT server. |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0428 ]-- |