One time in the work accidentally submitted the code should not be submitted to git, and before the discovery of a few commits, and now want to permanently delete this commit on the GIT server, the specific steps are recorded as follows.Assuming that the current branch is master, the current commit situation is as foll
Using GitHub as a remote repositoryGitHub website: https://github.com/
1. Create SSH key
If you do not have a. SSH directory, or the. SSH directory does not have Id_rsa and id_rsa.pub these two files:Ssh-keygen " [email protected] "Copy the id_rsa.pub to SSH key. Create a new key.
2. Add a remote Library
Log on to GitHub and then, in the upper right corner, find the "Create a new
entire project to version control.Here's a hidden. git file, don't miss out!!!After copying, you can delete the HelloWorld directory, then ls-al view the project directoryThen it is submitted to GitHub above the work!!!Perform the commit operation first, then enter the GIT push Origin master synchronizationNote here to remember to enter the user name and passwor
made a commit, this is because, there is a real-time configuration file refresh (just did not tick that), then we only delete it!Delete this configuration fileEnter terminalUse the CD command to enter the folder where our project is located:The picture is too much, the content is too detailed, the small compilation suggests reading the original.Long press the QR code, you can enter the original link
In fact, the GIT push and delete remote tag commands are the same. The delete operation is actually to push the empty source tag refs:Git push origin Tag NameEquivalentGit push origin refs/tags/source Tag Name: refs/tags/destination Tag Name
The GIT push document has an ex
localSometimes the transfer time-out is: Just try it a few more times.This time your project directory will be more than a HelloWorld folder, the folder to copy all the directories in the previous level of the directory, you can add the entire project to version control.Here's a hidden. git file, don't miss out!!!After copying, you can delete the HelloWorld directory, then ls-al view the project directoryT
entire project to version control.Here's a hidden. git file, don't miss out!!!After copying, you can delete the HelloWorld directory, then ls-al view the project directoryThen it is submitted to GitHub above the work!!!Perform the commit operation first, then enter the GIT push Origin master synchronizationNote here to remember to enter the user name and passwor
warehouseOpen git BashConfigure your identity first so that you can know who submitted it when you commit the codeEnter git config--global user.name "name"git config--global user.email "email address"CD into the current file directory, enter git init can be created ~Then use Ls-al Query code warehouse, if you want to
/master2c13da0b38b794581790ed0122a674d6ad6113ba
Looking back at the storage model created by the branch we have learned, the essence of the push is the creation of a commit object in the remote and the updating of the pointer. That is, if User B is pushed at this point, then the X descendant will point to B,b's parent and point to X, and then our X descendants are already pointing to a, so we fail.
2. Progr
When you use Git, you often find that you create a large number of branches unconsciously. So, the trouble is coming, so many abandoned branches, what should be done?
You can't always do a git branch-d branchname delete it!
Here's a way to bulk delete a
When using the git pull command, the code on the remote branch is not pulled down because there is no association between the local branch and the remote branch.It's easy to handle the problem by following the prompts: Git
The error when adding a remote GitHub repository using git today: Fatal:remote origin already exists.
Finally find the solution as follows:1. Delete remote git repository git remote rm
file,Delete all files under the Ticketbrushsystem directory, as shown in 5. Submit your code to remote GitHub5.1. Use git Add. command to add all files to version control, as shown in 5.2. Use the git commit-m "first commit" command to perform a local commit operation, as shown in 5.3. Use the
This is a created
article in which the information may have evolved or changed. Uploading to GitHub with Linux (Debian) git, Problems and solutions "git init git add bubble.gogit add bubble_test.gogit commit-m" "Git Remote Add Origin g
Reference: http://blog.csdn.net/shiren1118/article/details/7761203Workarounds for version and local version conflicts on GitHub$ git push XXX masterPush the latest changes to the local master branch to the remote library XXXUsername for ' https://github.com ': shiren1118Password for ' https://[email protected] ':To Https://github.com/shiren1118/iOS_code_agile.git
Locally connected to the development machine for development, using Phpstorm.
How can I switch branches in git and sync to the development environment.
Reply content:
Locally connected to the development machine for development, using Phpstorm.How can I switch branches in git and sync to the development environment.
Git does not automatically commit the c
First, create a git warehouse
1. Login to GitHub account
Https://github.com
2, click on the top right corner "+", select "New Repository", as shown:
3, operation as shown:
4, enter the following interface:
5, new Xcode project, open the terminal, CD to the project root directory, and then execute the following command: $ git init$ git Add.$
GitHub is a free git server that can find many open source projectsOfficial website: www.github.comafter registering your account, go to the homepageClick on the icon in the upper left corner to access the homepage, see 4 Help documents, click on the first document set up GitThe main is to use SSH key to manage editing permissions, in the last extension of the second chapter has introduced the use of SSH, according to the above documents can paste the
First step: Clone source code according to address(activemq-5.9) $ git clone https://github.com/apache/activemq.gitStep two: View the remote source version list(activemq-5.9) $ git branch-aStep three: Create a local branch based on the specified
Use git to download the project and deploy it on the local and remote servers.1. Configure Git1. download and install 2. After installation, right-click the desktop and select three more branches.
3. git clone code from git: 1> specify the url and directory (usually a workspace). If
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.