1: Modify User.Name and User.email that have submitted N-Times codeFix me in multiple computers, using different accounts, git config global,system,local configuration ignored changes, and added a number of computer SSH key default submission problem.# Two copies perform the following two linesgit filter-branch-f--env-filter "git_author_name= ' Wujuguang '; Git_author_email= ' [EMAIL protected] ';Git_committer_name= ' Wujuguang '; Git_committer_email=
1. Cancel tracking of certain files or folders:
Delete an object:
$ Git Rm -- cached filename
Delete a folder:
$ Git Rm-r -- cached path
2. Ignore some files or folders
$ VI. gitignore
Every row in the file is an ignored item.
AA. Log, ignore AA. log;
*. Log: Ignore files ending with. log;
Pod/*, ignore all folders under the pod directory
3. Merge multiple commits:
$
Master4. Submit local modifications to the remote repository:git addGit add-a--add changes to the local repositorygit rm xxx--delete the specified file from the local repositorygit rm-r xxx--Remove the specified folder from the local repositoryGit commit-m "Comments"--submit the contents of the native cache to the HEAD of this machineGit push Origin master--push local commit to remote repository5. Ignore the specified content using the. gitignore file:1. Create the. gitignore file at the local
1, (first into the project folder) by command git init to turn this directory into a repository that git can manageGit init2. Add the file to the repository, using the command git Add. Add to staging area inside, don't forget the decimal point ".", meaning to add all the files under the foldergit Add.3. Use the command git
1. Create a new library with git and submit a file1 Touch readme.md // This is the command to create a new file in the folder you want to native 2 git init // Initial session local library 3 It add readme.md // adding files to the library 4 git commit-m "First commit" // submit 5 git remote add origin [emai
Git The basic common commands are as follows:MKDIR:XX (Create an empty directory XX refers to the directory name)PWD: Displays the path to the current directory.Git init turns the current directory into a manageable git repository, creating a hidden. git file.git add xx adds xx files to the staging area.Git commit–m "X
First, use Git branch to create a branchUsage Scenario: No experience at the momentGit branch-a Show All branchesGit branch xx create XX branchgit checkout xx switch to XX branchGit checkout-b xx Create and switch to XX branchSecond, use Git stash save and restore work progressUsage scenario: Develop a new feature that has not been developed yet, but need to fix a bug urgently, you can save this progress, f
How do I get ssh Key?The first time you get the remote git code, there is no SSH key locally and can be generated using the following command (note: yufeng.x is the user name):ssh-keygen -t rsa -C "yufeng.x"Always press ENTER and finally get two files: Id_rsa and Id_rsa.pubYour identification has been saved In/users/xieyufeng/.ssh/id_rsa.Your public key has been saved in/users/xieyufeng/.ssh/id_rsa.pub.To display SSH key via the cat command:cat /Users
MKDIR:XX (Create an empty directory XX refers to the directory name)PWD: Displays the path to the current directory.Git init turns the current directory into a manageable git repository, creating a hidden. git file.git addxx add xx files to staging area.Git commit–m "XX" commits a file –m followed by a comment.Gitstatus View Warehouse Statusgit diff xx View xx file modified those contentGitlog View HistoryG
Git init: Turn the current directory into a repository that git can managegit add: Tell git to add files to the repositoryGit commit-m "": Submit the file to the repositoryGit status: View the current state of the warehousegit diff filename: see what the filename file has changedgit diff HEAD--filename: View the latest version of filename and workspace in the rep
Common git commands
Find a good summary blog, please refer to: http://blog.csdn.net/ariesjzj/article/details/7747876
Git Add: tracks new files, stores tracked files in the temporary storage area, and marks conflicting files as resolved during merge.Git status: Check the current file statusGit DIFF: compare the difference between the current file in the working di
Since you're not familiar with git, here are some common things to note.CD e:web/project//Enter directory under E-drivemkdir test//Create test directoryTouch README. MD//Create Readme.md fileGIT init//initial git repositorygit Add. Add all files in the current directory to staging areaGit commit-m. Submit all files in staging areaGit remote Add origin https://github.com/11pdg/demo.git//Add a hostGit push-u
As the largest open source repository, GitHub is a programmer's paradise as a version control tool and an endless trove of treasures to discover. Now let's talk about how to download a project on GitHub locally, that is, build a project repository locally, and you'll be able to build the project later.(1) Create a new folder locally and use the folder as a local repository. Then use the terminal command to enter the folder. For example, I use GitHub pages as a folder for this project..(2) then i
$ git CherrypickUsing a new command-----Picking instructions (git cherry-pick) to commit on the new branch "replayPicking instructions----git cherry-pick The implication is to choose from a multitude of submissions the applicationThe current work branch. The command needs to provide a commit ID as an argument. The procedure is equivalent to submitting theExported
If other developers have changed their code to the GitHub project, and I'm going to continue to develop on their hunger basis, how can I synchronize GitHub's code, and note that this is not the time to re-git init. Create a new warehouse on this machine. In fact, the local code warehouse and remote server has maintained a connection, we just pull down the code can be.
This will continue to be demonstrated on the basis of my previous blog, "Using
parameters, this way, it rolls back to a version, only retains the source code, fallback commit and index informationgit reset--soft: Fallback to a version that only returns the commit information and does not revert to the index file level. If you want to submit it, you can do it directly.git reset--hard: Completely fallback to a version, the local source code will also become the previous version of the contentgit reset head^: The default reset method, which points to the last commit before H
Create git spacegit initset The local cofiggit config--global user.name "xx" git config--global user.email "[Email Protec Ted] "Set the remote Urlgit Remote add Origin https://git.oschina.net/xx/aaa.gitdownload file:git fetchcreate the local bra Nch to link to the remote Branch:git checkout-b master origin/master Add new file:git add Filenamegit commit ... git pu
Git common command 2 Add remote repositories (take GitHub for example)Login to the official website https://github.com, if not, go to register an account.Then create a new warehouseIn the repository name fill in learngit , the other remains the default settings, click the "Create Repository" button, the successful creation of a new Git repository:At the moment, this warehouse on GitHub learngit is still emp
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.