GitHub合并了两个名称几乎相同的文件夹

时间:2016-03-27 20:16:08

标签: git github

在开始之前,我已经搜索过,但我还没有找到像这样的问题。只有类似的东西,但不完全是我的问题。

我从" assets"更改了我的项目文件夹的名称。到"资产"并将提交推送到GitHub。

突然间,在GitHub上我有两个文件夹而不是一个,有些东西在"资产"和一些资产"。

奇怪的是,如果您将所有内容都放入计算机,或者只是从GitHub下载zip,那么您只能获得一个名为" Assets"包含所有内容。

如何将它们合并到GitHub中的1个文件夹中?

2 个答案:

答案 0 :(得分:2)

您可能遇到了Windows问题,其中文件名不区分大小写。

如果可能,最简单的修复方法是回滚,然后使用<html> <head> <title>Shooting star Example</title> <meta charset="utf-8"> <meta name="author" content="@manufosela"> </head> <body class="stars"> <h1>SHOOTING STARS...</h1> <div id="ShootingStarParams"></div> <script type="text/javascript" src="http://codeorigin.jquery.com/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="ShootingStarClass.js"></script> <script type="text/javascript"> $( document ).ready( function(){ var shootingStarObj = new ShootingStar( "body" ); shootingStarObj.launch(); }); </script> </body> </html> body { color:#FFF; height:600px; width:99%; height:95%; color:#FFF; } .stars { z-index: 0; position: absolute; /* width: 420em; height: 70em; */ background-image: url( http://www.14denoviembre.es/img/hori.png ), url( http://www.14denoviembre.es/img/stars_5.png ); background-repeat: repeat-x,repeat-x repeat-y; transform:translate3D(0em, 0em, 0); animation: stars 21s ease; transform-style: preserve-3d; } (function(){ /** author: @manufosela 2013/08/27 copyleft 2013 ShootingStar class Main Methods: launch: launch shooting stars every N seconds received by param. 10 seconds by default. launchStar: launch a shooting star. Received options object by param with: - dir (direction between 0 and 1) - life (between 100 and 400) - beamSize (between 400 and 700) - velocity (between 2 and 10) **/ ShootingStar = function( id ) { this.n = 0; this.m = 0; this.defaultOptions = { velocity:8, starSize:10, life:300, beamSize:400, dir:-1 }; this.options = {}; id = ( typeof id != "undefined" )?id:""; this.capa = ( $( id ).lenght > 0 )?"body":id; this.wW = $( this.capa ).innerWidth(); this.hW = $( this.capa ).innerHeight(); }; ShootingStar.prototype.addBeamPart = function( x, y ) { this.n++; var name = this.getRandom( 100, 1 ); $( "#star"+name ).remove(); $( this.capa ).append( "<div id='star"+name+"'></div>" ); $( "#star"+name ).append( "<div id='haz"+this.n+"' class='haz' style='position:absolute; color:#FF0; width:10px; height:10px; font-weight:bold; font-size:"+this.options.starSize+"px'>·</div>" ); if ( this.n > 1 ) $( "#haz" + ( this.n - 1 ) ).css( { color:"rgba(255,255,255,0.5)" } ); $( "#haz" + this.n ).css( { top: y + this.n, left: x + ( this.n * this.options.dir ) } ); } ShootingStar.prototype.delTrozoHaz = function() { this.m++; $( "#haz" + this.m ).animate( {opacity:0}, 75 ); if ( this.m >= this.options.beamSize ) { $( "#ShootingStarParams" ).fadeOut( "slow" ); } } ShootingStar.prototype.getRandom = function( max, min ) { return Math.floor( Math.random() * (max - min + 1)) + min; } ShootingStar.prototype.toType = function ( obj ) { if ( typeof obj === "undefined" ) { return "undefined"; /* consider: typeof null === object */ } if ( obj === null ) { return "null"; } var type = Object.prototype.toString.call( obj ).match( /^\[object\s(.*)\]$/ )[1] || ''; switch ( type ) { case 'Number': if ( isNaN( obj ) ) { return "nan"; } else { return "number"; } case 'String': case 'Boolean': case 'Array': case 'Date': case 'RegExp': case 'Function': return type.toLowerCase(); } if ( typeof obj === "object" ) { return "object"; } return undefined; } ShootingStar.prototype.launchStar = function( options ) { if ( this.toType( options ) != "object" ) { options = {}; } this.options = $.extend( {}, this.defaultOptions, options ); this.n=0; this.m=0; var i=0, l=this.options.beamSize, x=this.getRandom( this.wW - this.options.beamSize - 100, 100 ), y=this.getRandom( this.hW - this.options.beamSize - 100, 100 ), self = this; for( ; i<l; i++ ) { setTimeout( function(){ self.addBeamPart( x, y ); }, self.options.life + ( i * self.options.velocity ) ); } for( i=0; i<l; i++ ) { setTimeout( function(){ self.delTrozoHaz() }, self.options.beamSize + ( i * self.options.velocity ) ); } $( "#ShootingStarParams" ).html( "Launching shooting star. PARAMS: wW: " + this.wW + " - hW: " + this.hW + " - life: " + this.options.life + " - beamSize: " + this.options.beamSize + " - velocity: " + this.options.velocity ); $( "#ShootingStarParams" ).fadeIn( "slow" ); } ShootingStar.prototype.launch = function( everyTime ) { if ( this.toType( everyTime ) != "number" ) { everyTime = 10; } everyTime = everyTime * 1000; this.launchStar(); var self = this; setInterval( function() { var options = { dir: ( self.getRandom( 1, 0 ))?1:-1, life: self.getRandom( 400, 100 ), beamSize: self.getRandom( 700, 400 ), velocity: self.getRandom( 10, 4 ) } self.launchStar( options ); }, everyTime ); } })(); 正确重命名该文件夹。

答案 1 :(得分:1)

您可能有两个解决方案:

1)您覆盖了git add Assets提交,但未涵盖git rm assets

2)您的隐藏文件仍然出现在旧资源文件夹中(查找以点开头的文件)

3)您可能正在查看仍具有旧资产文件夹的分支。

如果它不是上述解决方案之一,请在GitHub上使用此回购:

https://github.com/tawman/git-unite

相关问题